Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zstyle tag-order completion issue



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


Messages sorted by: Reverse Date, Date, Thread, Author