* zstyle tag-order completion issue @ 2020-09-09 12:33 Ahmad Ismail 2020-09-09 18:03 ` Daniel Shahaf 2020-09-09 18:09 ` another issue with `git diff` (was: zstyle tag-order completion issue) Daniel Shahaf 0 siblings, 2 replies; 8+ messages in thread From: Ahmad Ismail @ 2020-09-09 12:33 UTC (permalink / raw) To: Zsh Users [-- Attachment #1: Type: text/plain, Size: 2741 bytes --] Hi All, In git completion, I want ancillary-manipulator-commands tag first, then ancillary-interrogator-commands tag, then rest of the tags. My following zstyle is showing ancillary-manipulator-commands tag first, then ancillary-interrogator-commands tag, but then not showing rest of the tags. zstyle -e ':completion::complete:git:argument-1:' tag-order ' reply=( "ancillary-manipulator-commands ancillary-interrogator-commands" - ) ' While I am at it, I have another issue with `git diff` My current completion looks like: % git diff <tab> Completing local head HEAD master ORIG_HEAD stash Completing recent commit object name 3168f4f -- [HEAD] first (6 weeks ago) Completing head HEAD master Completing changed in working tree file xy1.txt xy2.txt xy4.txt Completing blob object name I want to put "Completing changed in working tree file" at the top. When I invoke _complete_help widget it says tags in context :completion::complete:git:: argument-rest (_arguments _git) tags in context :completion::complete:git-diff:: argument-rest options (_arguments _git-diff _git) tags in context :completion::complete:git-diff:argument-rest: commit-ranges blobs-and-trees-in-treeish files blobs (_git-diff _git) heads commit-tags commit-objects (__git_commits __git_commit_ranges _git-diff _git) heads-local heads-remote (__git_heads __git_commits __git_commit_ranges _git-diff _git) heads-local (__git_describe_branch __git_describe_commit __git_heads_local __git_heads __git_commits __git_commit_ranges _git-diff _git) heads-remote (__git_describe_branch __git_describe_commit __git_heads_remote __git_heads __git_commits __git_commit_ranges _git-diff _git) commit-tags (__git_tags_of_type __git_commit_tags __git_commits __git_commit_ranges _git-diff _git) commits (__git_recent_commits __git_commit_objects_prefer_recent __git_commits __git_commit_ranges _git-diff _git) commit-tags (__git_recent_commits __git_commit_objects_prefer_recent __git_commits __git_commit_ranges _git-diff _git) heads (__git_recent_commits __git_commit_objects_prefer_recent __git_commits __git_commit_ranges _git-diff _git) changed-in-working-tree-files (__git_changed-in-working-tree_files _git-diff _git) blob-tags blob-objects (__git_blobs _git-diff _git) blob-tags (__git_tags_of_type __git_blob_tags __git_blobs _git-diff _git) blob-objects (_message _guard __git_blob_objects __git_blobs _git-diff _git) However, I am not understanding how my zstyle needs to actually look like. Thanks and Best Regards, Ahmad Ismail [-- Attachment #2: Type: text/html, Size: 3628 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: zstyle tag-order completion issue 2020-09-09 12:33 zstyle tag-order completion issue Ahmad Ismail @ 2020-09-09 18:03 ` Daniel Shahaf 2020-09-09 20:17 ` Ahmad Ismail 2020-09-09 18:09 ` another issue with `git diff` (was: zstyle tag-order completion issue) Daniel Shahaf 1 sibling, 1 reply; 8+ messages in thread From: Daniel Shahaf @ 2020-09-09 18:03 UTC (permalink / raw) To: Ahmad Ismail; +Cc: Zsh Users Ahmad Ismail wrote on Wed, 09 Sep 2020 18:33 +0600: > In git completion, I want ancillary-manipulator-commands tag first, then > ancillary-interrogator-commands tag, then rest of the tags. > > My following zstyle is showing ancillary-manipulator-commands tag first, > then ancillary-interrogator-commands tag, but then not showing rest of the > tags. > > zstyle -e ':completion::complete:git:argument-1:' tag-order ' > reply=( > "ancillary-manipulator-commands > ancillary-interrogator-commands" > - > ) > ' This means: First, show a-m-commands and a-i-commands; and, because of the dash, show nothing else. So, just delete the solitary dash. Note: with that configuration, you'll have to invoke _next_tags (q.v.) in order to list completions from other tags. Incidentally, you can always simply «zstyle -e foo bar 'reply=(baz qux)'» to «zstyle foo bar baz qux». It's exactly equivalent. Note the quoting. «zstyle … tag-order 'foo bar'» and «zstyle … tag-order foo bar» are both valid, but have different meanings. Cheers, Daniel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: zstyle tag-order completion issue 2020-09-09 18:03 ` Daniel Shahaf @ 2020-09-09 20:17 ` Ahmad Ismail 2020-09-09 20:27 ` Ahmad Ismail 0 siblings, 1 reply; 8+ messages in thread From: Ahmad Ismail @ 2020-09-09 20:17 UTC (permalink / raw) To: Daniel Shahaf; +Cc: Zsh Users [-- Attachment #1: Type: text/plain, Size: 1324 bytes --] Hi Daniel Shahaf, Thank you very much for this kind reply. *Best Regards,Ahmad Ismail* On Thu, Sep 10, 2020 at 12:03 AM Daniel Shahaf <d.s@daniel.shahaf.name> wrote: > Ahmad Ismail wrote on Wed, 09 Sep 2020 18:33 +0600: > > In git completion, I want ancillary-manipulator-commands tag first, then > > ancillary-interrogator-commands tag, then rest of the tags. > > > > My following zstyle is showing ancillary-manipulator-commands tag first, > > then ancillary-interrogator-commands tag, but then not showing rest of > the > > tags. > > > > zstyle -e ':completion::complete:git:argument-1:' tag-order ' > > reply=( > > "ancillary-manipulator-commands > > ancillary-interrogator-commands" > > - > > ) > > ' > > This means: First, show a-m-commands and a-i-commands; and, because of > the dash, show nothing else. So, just delete the solitary dash. Note: > with that configuration, you'll have to invoke _next_tags (q.v.) in > order to list completions from other tags. > > Incidentally, you can always simply «zstyle -e foo bar 'reply=(baz > qux)'» to «zstyle foo bar baz qux». It's exactly equivalent. > > Note the quoting. «zstyle … tag-order 'foo bar'» and «zstyle … > tag-order foo bar» are both valid, but have different meanings. > > Cheers, > > Daniel > [-- Attachment #2: Type: text/html, Size: 2552 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: zstyle tag-order completion issue 2020-09-09 20:17 ` Ahmad Ismail @ 2020-09-09 20:27 ` Ahmad Ismail 2020-09-09 23:37 ` Ahmad Ismail 0 siblings, 1 reply; 8+ messages in thread From: Ahmad Ismail @ 2020-09-09 20:27 UTC (permalink / raw) To: Daniel Shahaf; +Cc: Zsh Users [-- Attachment #1: Type: text/plain, Size: 1789 bytes --] Hi Daniel Shahaf, I just noticed an issue. When I use zstyle -e :completion::complete:git:argument-1: tag-order ancillary-manipulator-commands ancillary-interrogator-commands _next_tags The sequence of tags is ok except "Completing main porcelain command" remains at the top. *Thanks and Best Regards,Ahmad Ismail* On Thu, Sep 10, 2020 at 2:17 AM Ahmad Ismail <ismail783@gmail.com> wrote: > Hi Daniel Shahaf, > > Thank you very much for this kind reply. > > *Best Regards,Ahmad Ismail* > > > On Thu, Sep 10, 2020 at 12:03 AM Daniel Shahaf <d.s@daniel.shahaf.name> > wrote: > >> Ahmad Ismail wrote on Wed, 09 Sep 2020 18:33 +0600: >> > In git completion, I want ancillary-manipulator-commands tag first, >> then >> > ancillary-interrogator-commands tag, then rest of the tags. >> > >> > My following zstyle is showing ancillary-manipulator-commands tag first, >> > then ancillary-interrogator-commands tag, but then not showing rest of >> the >> > tags. >> > >> > zstyle -e ':completion::complete:git:argument-1:' tag-order ' >> > reply=( >> > "ancillary-manipulator-commands >> > ancillary-interrogator-commands" >> > - >> > ) >> > ' >> >> This means: First, show a-m-commands and a-i-commands; and, because of >> the dash, show nothing else. So, just delete the solitary dash. Note: >> with that configuration, you'll have to invoke _next_tags (q.v.) in >> order to list completions from other tags. >> >> Incidentally, you can always simply «zstyle -e foo bar 'reply=(baz >> qux)'» to «zstyle foo bar baz qux». It's exactly equivalent. >> >> Note the quoting. «zstyle … tag-order 'foo bar'» and «zstyle … >> tag-order foo bar» are both valid, but have different meanings. >> >> Cheers, >> >> Daniel >> > [-- Attachment #2: Type: text/html, Size: 4031 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: zstyle tag-order completion issue 2020-09-09 20:27 ` Ahmad Ismail @ 2020-09-09 23:37 ` Ahmad Ismail 0 siblings, 0 replies; 8+ messages in thread From: Ahmad Ismail @ 2020-09-09 23:37 UTC (permalink / raw) To: Daniel Shahaf; +Cc: Zsh Users [-- Attachment #1: Type: text/plain, Size: 2220 bytes --] The solution that is working for me is zstyle :completion::complete:git:argument-1: group-order ancillary-manipulator-commands ancillary-interrogator-commands zstyle :completion::complete:git-diff:argument-rest: group-order files *Thanks and Best Regards,Ahmad Ismail* On Thu, Sep 10, 2020 at 2:27 AM Ahmad Ismail <ismail783@gmail.com> wrote: > Hi Daniel Shahaf, > > I just noticed an issue. When I use > > zstyle -e :completion::complete:git:argument-1: tag-order > ancillary-manipulator-commands ancillary-interrogator-commands _next_tags > > The sequence of tags is ok except "Completing main porcelain command" > remains at the top. > > *Thanks and Best Regards,Ahmad Ismail* > > > On Thu, Sep 10, 2020 at 2:17 AM Ahmad Ismail <ismail783@gmail.com> wrote: > >> Hi Daniel Shahaf, >> >> Thank you very much for this kind reply. >> >> *Best Regards,Ahmad Ismail* >> >> >> On Thu, Sep 10, 2020 at 12:03 AM Daniel Shahaf <d.s@daniel.shahaf.name> >> wrote: >> >>> Ahmad Ismail wrote on Wed, 09 Sep 2020 18:33 +0600: >>> > In git completion, I want ancillary-manipulator-commands tag first, >>> then >>> > ancillary-interrogator-commands tag, then rest of the tags. >>> > >>> > My following zstyle is showing ancillary-manipulator-commands tag >>> first, >>> > then ancillary-interrogator-commands tag, but then not showing rest of >>> the >>> > tags. >>> > >>> > zstyle -e ':completion::complete:git:argument-1:' tag-order ' >>> > reply=( >>> > "ancillary-manipulator-commands >>> > ancillary-interrogator-commands" >>> > - >>> > ) >>> > ' >>> >>> This means: First, show a-m-commands and a-i-commands; and, because of >>> the dash, show nothing else. So, just delete the solitary dash. Note: >>> with that configuration, you'll have to invoke _next_tags (q.v.) in >>> order to list completions from other tags. >>> >>> Incidentally, you can always simply «zstyle -e foo bar 'reply=(baz >>> qux)'» to «zstyle foo bar baz qux». It's exactly equivalent. >>> >>> Note the quoting. «zstyle … tag-order 'foo bar'» and «zstyle … >>> tag-order foo bar» are both valid, but have different meanings. >>> >>> Cheers, >>> >>> Daniel >>> >> [-- Attachment #2: Type: text/html, Size: 5392 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* another issue with `git diff` (was: zstyle tag-order completion issue) 2020-09-09 12:33 zstyle tag-order completion issue Ahmad Ismail 2020-09-09 18:03 ` Daniel Shahaf @ 2020-09-09 18:09 ` Daniel Shahaf 2020-09-09 20:49 ` Ahmad Ismail 1 sibling, 1 reply; 8+ messages in thread From: Daniel Shahaf @ 2020-09-09 18:09 UTC (permalink / raw) To: Ahmad Ismail; +Cc: Zsh Users Ahmad Ismail wrote on Wed, 09 Sep 2020 18:33 +0600: > While I am at it, I have another issue with `git diff` (This question is outstanding.) Cheers, Daniel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: another issue with `git diff` (was: zstyle tag-order completion issue) 2020-09-09 18:09 ` another issue with `git diff` (was: zstyle tag-order completion issue) Daniel Shahaf @ 2020-09-09 20:49 ` Ahmad Ismail 2020-09-09 20:58 ` Daniel Shahaf 0 siblings, 1 reply; 8+ messages in thread From: Ahmad Ismail @ 2020-09-09 20:49 UTC (permalink / raw) To: Daniel Shahaf; +Cc: Zsh Users [-- Attachment #1: Type: text/plain, Size: 761 bytes --] Hi Daniel Shahaf, Sorry for bothering you. I tried: zstyle -e :completion::complete:git-diff:argument-rest: tag-order changed-in-working-tree-files _next_tags It says: _tags:16: command not found: changed-in-working-tree-files _tags:16: command not found: changed-in-working-tree-files _tags:16: command not found: changed-in-working-tree-files _tags:16: command not found: changed-in-working-tree-files ..... I am extremely sorry for disturbing you too much. *Thanks and Best Regards,Ahmad Ismail* On Thu, Sep 10, 2020 at 12:09 AM Daniel Shahaf <d.s@daniel.shahaf.name> wrote: > Ahmad Ismail wrote on Wed, 09 Sep 2020 18:33 +0600: > > While I am at it, I have another issue with `git diff` > > (This question is outstanding.) > > Cheers, > > Daniel > [-- Attachment #2: Type: text/html, Size: 1991 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: another issue with `git diff` (was: zstyle tag-order completion issue) 2020-09-09 20:49 ` Ahmad Ismail @ 2020-09-09 20:58 ` Daniel Shahaf 0 siblings, 0 replies; 8+ messages in thread From: Daniel Shahaf @ 2020-09-09 20:58 UTC (permalink / raw) To: Ahmad Ismail; +Cc: Zsh Users Ahmad Ismail wrote on Wed, 09 Sep 2020 20:49 +00:00: > zstyle -e :completion::complete:git-diff:argument-rest: tag-order > changed-in-working-tree-files _next_tags First, remove the -e. That'll address the error you reported. Second, _next_tags is not a tag; it's a widget (= a shell function that can be bound to a keystroke). It doesn't belong in the value of the tag- order style. When you set «tag-order foo bar baz», you'll find that only completions under the tag foo are displayed at first. To display completions of the tag bar, you'll have to invoke _next_tags. However, as a widget, it's not invoked by typing out its name; rather, it's invoked by pressing whichever key combination or chord is bound to it. That's explained in the manual, under tag-order and _next_tags (they both have entries). Cheers, Daniel ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-09-09 23:38 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-09-09 12:33 zstyle tag-order completion issue Ahmad Ismail 2020-09-09 18:03 ` Daniel Shahaf 2020-09-09 20:17 ` Ahmad Ismail 2020-09-09 20:27 ` Ahmad Ismail 2020-09-09 23:37 ` Ahmad Ismail 2020-09-09 18:09 ` another issue with `git diff` (was: zstyle tag-order completion issue) Daniel Shahaf 2020-09-09 20:49 ` Ahmad Ismail 2020-09-09 20:58 ` Daniel Shahaf
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).