From 13fc579343b24d298fb8905933b6000d7fcda114 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 14 Oct 2014 23:03:40 +0200 Subject: 33467: correct return status on functions and numerous other minor fixes --- Completion/Unix/Command/_git | 89 ++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 53 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index c4e386b15..38bd72979 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5262,12 +5262,10 @@ __git_gpg_secret_keys () { (( $+functions[__git_merge_strategies] )) || __git_merge_strategies () { local expl - local -a merge_strategies - merge_strategies=(${=${${(M)${(f)"$(_call_program merge-strategies "git merge -s '' 2>&1")"}:#[Aa]vailable (custom )#strategies are: *}#[Aa]vailable (custom )#strategies are: }%.}) - __git_command_successful $pipestatus || return 1 - - _wanted merge-strategies expl 'merge strategy' compadd $* - $merge_strategies + _wanted merge-strategies expl 'merge strategy' compadd "$@" - \ + ${=${${${(M)${(f)"$(_call_program merge-strategies \ + "git merge -s '' 2>&1")"}:#[Aa]vailable (custom )#strategies are: *}#[Aa]vailable (custom )#strategies are: }%.}:-octopus ours recursive resolve subtree} } (( $+functions[__git_encodings] )) || @@ -5299,8 +5297,9 @@ __git_remotes () { local remotes expl remotes=(${(f)"$(_call_program remotes git remote 2>/dev/null)"}) + __git_command_successful $pipestatus || return 1 - _wanted remotes expl remote compadd $* - $remotes + _wanted remotes expl remote compadd "$@" -a - remotes } (( $+functions[__git_ref_specs] )) || @@ -5431,13 +5430,7 @@ __git_reflog_entries () { reflog_entries=(${${${(f)"$(_call_program reflog-entries git reflog 2>/dev/null)"}#* }%%:*}) __git_command_successful $pipestatus || return 1 - if compset -P '*@'; then - reflog_entries=(${${(M)reflog_entries:#$IPREFIX*}#$IPREFIX}) - _wanted reflog-entries expl 'reflog entry' compadd $* - $reflog_entries - else - reflog_entries=(${reflog_entries%@*}) - _wanted reflog-entries expl 'reflog entry' compadd -qS @ $* - $reflog_entries - fi + _wanted reflog-entries expl 'reflog entry' _multi_parts @ reflog_entries } (( $+functions[__git_ref_sort_keys] )) || @@ -5492,7 +5485,7 @@ __git_stashes () { stashes=(${${(f)"$(_call_program stashes git stash list 2>/dev/null)"}/: */}) __git_command_successful $pipestatus || return 1 - _wanted stashes expl stash compadd $* - $stashes + _wanted stashes expl stash compadd "$@" -a - stashes } (( $+functions[__git_svn_revisions] )) || @@ -5531,7 +5524,7 @@ __git_branch_names () { branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/}) __git_command_successful $pipestatus || return 1 - _wanted branch-names expl branch-name compadd $* - $branch_names + _wanted branch-names expl branch-name compadd "$@" -a - branch_names } (( $+functions[__git_remote_branch_names] )) || @@ -5542,7 +5535,7 @@ __git_remote_branch_names () { branch_names=(${${(f)"$(_call_program remote-branch-refs git for-each-ref --format='"%(refname)"' refs/remotes 2>/dev/null)"}#refs/remotes/}) __git_command_successful $pipestatus || return 1 - _wanted remote-branch-names expl 'remote branch name' compadd $* - $branch_names + _wanted remote-branch-names expl 'remote branch name' compadd "$@" -a - branch_names } (( $+functions[__git_remote_branch_names_noprefix] )) || @@ -5553,7 +5546,7 @@ __git_remote_branch_names_noprefix () { branch_names=(${${${(f)"$(_call_program remote-branch-refs-noprefix git for-each-ref --format='"%(refname)"' refs/remotes 2>/dev/null)"}##*/}:#HEAD}) __git_command_successful $pipestatus || return 1 - _wanted remote-branch-names-noprefix expl 'remote branch name' compadd $* - $branch_names + _wanted remote-branch-names-noprefix expl 'remote branch name' compadd "$@" -a - branch_names } (( $+functions[__git_commits] )) || @@ -5582,7 +5575,7 @@ __git_heads () { done fi - _wanted heads expl head compadd $* - $heads + _wanted heads expl head compadd "$@" -a - heads } (( $+functions[__git_commit_objects] )) || @@ -5678,7 +5671,7 @@ __git_submodules () { submodules=(${${${(f)"$(_call_program submodules git submodule 2>/dev/null)"}#?* }%% *}) __git_command_successful $pipestatus || return 1 - _wanted submodules expl submodule compadd $* - $submodules + _wanted submodules expl submodule compadd "$@" -a - submodules } # Tag Argument Types @@ -5691,7 +5684,7 @@ __git_tags () { tags=(${${(f)"$(_call_program tagrefs git for-each-ref --format='"%(refname)"' refs/tags 2>/dev/null)"}#refs/tags/}) __git_command_successful $pipestatus || return 1 - _wanted tags expl tag compadd $* - $tags + _wanted tags expl tag compadd "$@" -a - tags } (( $+functions[__git_commit_tags] )) || @@ -5714,7 +5707,7 @@ __git_tags_of_type () { tags=(${${(M)${(f)"$(_call_program $type-tag-refs "git for-each-ref --format='%(*objecttype)%(objecttype) %(refname)' refs/tags 2>/dev/null")"}:#$type(tag|) *}#$type(tag|) refs/tags/}) __git_command_successful $pipestatus || return 1 - _wanted $type-tags expl "$type tag" compadd $* - $tags + _wanted $type-tags expl "$type tag" compadd "$@" -a - tags } # Reference Argument Types @@ -5737,7 +5730,7 @@ __git_references () { _git_refs_cache_pwd=$PWD fi - _wanted references expl 'references' compadd - $_git_refs_cache + _wanted references expl 'reference' compadd -a - _git_refs_cache } (( $+functions[__git_local_references] )) || @@ -5750,7 +5743,7 @@ __git_local_references () { _git_local_refs_cache_pwd=$PWD fi - _wanted references expl 'references' compadd - $_git_local_refs_cache + _wanted references expl 'reference' compadd -a - _git_local_refs_cache } (( $+functions[__git_remote_references] )) || @@ -5766,7 +5759,7 @@ __git_notes_refs () { notes_refs=(${${(f)"$(_call_program notes-refs git for-each-ref --format='"%(refname)"' refs/notes 2>/dev/null)"}#$type refs/notes/}) __git_command_successful $pipestatus || return 1 - _wanted notes-refs expl 'notes ref' compadd $* - $notes_refs + _wanted notes-refs expl 'notes ref' compadd "$@" -a - notes_refs } # File Argument Types @@ -6406,7 +6399,6 @@ __git_config_values () { # Git Config Sections and Types (( $+functions[__git_browsers] )) || __git_browsers () { - integer ret=1 local expl declare -a userbrowsers builtinbrowsers @@ -6431,16 +6423,9 @@ __git_browsers () { cygstart xdg-open) - _tags user-browsers builtin-browsers - - while _tags; do - _requested user-browsers expl 'user-defined browser' compadd $* - $userbrowsers && ret=0 - _requested builtin-browsers expl 'builtin browser' compadd $* - $builtinbrowsers && ret=0 - - (( ret )) || break - done - - return ret + _alternative \ + 'user-browsers:user-defined browser:compadd -a - userbrowsers' \ + 'builtin-browsers:builtin browser:compadd -a - builtinbrowsers' } (( $+functions[__git_difftools] )) || @@ -6483,10 +6468,10 @@ __git_diff-or-merge-tools () { esac while _tags; do - _requested user-difftools expl 'user-defined difftool' compadd $* - $userdifftools && ret=0 - _requested user-mergetools expl 'user-defined mergetool' compadd $* - $usermergetools && ret=0 - _requested builtin-difftools expl 'builtin difftool' compadd $* - $builtindifftools && ret=0 - _requested builtin-mergetools expl 'builtin mergetool' compadd $* - $builtinmergetools && ret=0 + _requested user-difftools expl 'user-defined difftool' compadd "$@" -a - userdifftools && ret=0 + _requested user-mergetools expl 'user-defined mergetool' compadd "$@" -a - usermergetools && ret=0 + _requested builtin-difftools expl 'builtin difftool' compadd "$@" -a - builtindifftools && ret=0 + _requested builtin-mergetools expl 'builtin mergetool' compadd "$@" -a - builtinmergetools && ret=0 (( ret )) || break done @@ -6577,20 +6562,18 @@ __git_sendemail_suppresscc_values () { (( $+functions[__git_colors] )) || __git_colors () { - declare -a colors + declare -a expl - colors=(black red green yellow blue magenta cyan white) - - _describe -t colors color colors $* + _wanted colors expl color compadd "$@" - \ + black red green yellow blue magenta cyan white } (( $+functions[__git_color_attributes] )) || __git_color_attributes () { - declare -a attributes - - attributes=(bold dim ul blink reverse) + declare -a expl - _describe -t attributes attribute attributes $* + _wanted attributes expl attribute compadd "$@" - \ + bold dim ul blink reverse } # Now, for the main drive... @@ -6657,12 +6640,12 @@ _git() { (option-or-argument) curcontext=${curcontext%:*:*}:git-$words[1]: - if (( $+functions[_git-$words[1]] )); then - _call_function ret _git-$words[1] - elif zstyle -T :completion:$curcontext: use-fallback; then - _files && ret=0 - else - _message 'unknown sub-command' + if ! _call_function ret _git-$words[1]; then + if zstyle -T :completion:$curcontext: use-fallback; then + _default && ret=0 + else + _message "unknown sub-command: $words[1]" + fi fi ;; esac -- cgit v1.2.3 From 9161a16b2e2c770c7d518a394208476cf6c418fd Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 23 Nov 2014 21:03:37 +0000 Subject: 33729: "git remote add" should complete local repositories --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index eba113e06..6f8438db2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-11-23 Peter Stephenson + * 33729: Completion/Unix/Command/_git: "git remote add" should + complete local repositories. + * 33740: Stephane: Doc/Zsh/expn.yo: "hideval" parameter type. * 33740: Stephane: Etc/FAQ.yo: Another way of avoiding MULTIO diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 38bd72979..8fcfc153d 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -3161,7 +3161,15 @@ _git-remote () { '(-m --master)'{-m,--master=}'[set HEAD of remote to point to given master branch]: :__git_branch_names' \ '--mirror[do not use separate remotes]' \ ':name:__git_remotes' \ - ':url:_urls' && ret=0 + ':repository:->repository' && ret=0 + case $state in + (repository) + _alternative \ + 'local-repositories::__git_local_repositories' \ + 'remote-repositories::__git_remote_repositories' \ + 'urls::_urls' && ret=0 + ;; + esac ;; (rename) _arguments \ -- cgit v1.2.3 From c7850ac4f64239897b7311c6245785559e2b48e9 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Tue, 16 Dec 2014 23:43:28 +0000 Subject: 34042: _git: Respect tags for subcommand completion. It is now possible to use the tag-order style to stagger the overwhelming 'git ' subcommand listing. For example: zstyle ':completion::complete:git:argument-1:' tag-order \ main-porcelain-commands user-commands third-party-commands \ ancillary-manipulator-commands ancillary-interrogator-commands \ plumbing-manipulator-commands plumbing-interrogator-commands \ aliases --- ChangeLog | 5 ++++ Completion/Unix/Command/_git | 68 +++++++++++++++++++++++++++++++++++--------- 2 files changed, 59 insertions(+), 14 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 601c2e160..75a16bcf7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-01-05 Daniel Shahaf + + * 34042: Completion/Unix/Command/_git: Respect tags for subcommand + completion. + 2015-01-05 Peter Stephenson * Timofey Titovets: 34053: Completion/Linux/Command/_modutils: diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 8fcfc153d..bdb58e52c 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5206,20 +5206,60 @@ _git_commands () { integer ret=1 - # TODO: Is this the correct way of doing it? Should we be using _alternative - # and separate functions for each set of commands instead? - _describe -t aliases alias unique_aliases && ret=0 - _describe -t main-porcelain-commands 'main porcelain command' main_porcelain_commands && ret=0 - _describe -t user-commands 'user command' user_commands && ret=0 - _describe -t third-party-commands 'third-party command' third_party_commands && ret=0 - _describe -t ancillary-manipulator-commands 'ancillary manipulator command' ancillary_manipulator_commands && ret=0 - _describe -t ancillary-interrogator-commands 'ancillary interrogator command' ancillary_interrogator_commands && ret=0 - _describe -t interaction-commands 'interaction command' interaction_commands && ret=0 - _describe -t plumbing-manipulator-commands 'plumbing manipulator command' plumbing_manipulator_commands && ret=0 - _describe -t plumbing-interrogator-commands 'plumbing interrogator command' plumbing_interrogator_commands && ret=0 - _describe -t plumbing-sync-commands 'plumbing sync command' plumbing_sync_commands && ret=0 - _describe -t plumbing-sync-helper-commands 'plumbing sync helper command' plumbing_sync_helper_commands && ret=0 - _describe -t plumbing-internal-helper-commands 'plumbing internal helper command' plumbing_internal_helper_commands && ret=0 + _tags \ + aliases \ + main-porcelain-commands \ + user-commands \ + third-party-commands \ + ancillary-manipulator-commands \ + ancillary-interrogator-commands \ + interaction-commands \ + plumbing-manipulator-commands \ + plumbing-interrogator-commands \ + plumbing-sync-commands \ + plumbing-sync-helper-commands \ + plumbing-internal-helper-commands + + while _tags; do + + _requested aliases && \ + _describe -t aliases 'alias' unique_aliases && ret=0 + + _requested main-porcelain-commands && \ + _describe -t main-porcelain-commands 'main porcelain command' main_porcelain_commands && ret=0 + + _requested user-commands && \ + _describe -t user-commands 'user command' user_commands && ret=0 + + _requested third-party-commands && \ + _describe -t third-party-commands 'third-party command' third_party_commands && ret=0 + + _requested ancillary-manipulator-commands && \ + _describe -t ancillary-manipulator-commands 'ancillary manipulator command' ancillary_manipulator_commands && ret=0 + + _requested ancillary-interrogator-commands && \ + _describe -t ancillary-interrogator-commands 'ancillary interrogator command' ancillary_interrogator_commands && ret=0 + + _requested interaction-commands && \ + _describe -t interaction-commands 'interaction command' interaction_commands && ret=0 + + _requested plumbing-manipulator-commands && \ + _describe -t plumbing-manipulator-commands 'plumbing manipulator command' plumbing_manipulator_commands && ret=0 + + _requested plumbing-interrogator-commands && \ + _describe -t plumbing-interrogator-commands 'plumbing interrogator command' plumbing_interrogator_commands && ret=0 + + _requested plumbing-sync-commands && \ + _describe -t plumbing-sync-commands 'plumbing sync command' plumbing_sync_commands && ret=0 + + _requested plumbing-sync-helper-commands && \ + _describe -t plumbing-sync-helper-commands 'plumbing sync helper command' plumbing_sync_helper_commands && ret=0 + + _requested plumbing-internal-helper-commands && \ + _describe -t plumbing-internal-helper-commands 'plumbing internal helper command' plumbing_internal_helper_commands && ret=0 + + (( ret )) || break + done return ret } -- cgit v1.2.3 From 9ca77b2143e86cd2d01ac602384cd82b7e664190 Mon Sep 17 00:00:00 2001 From: Wieland Hoffmann Date: Fri, 16 Jan 2015 23:22:45 +0100 Subject: _git: Change one --validate to --no-validate As the description of that argument says, it's used to *not* perform sanity checks. --- Completion/Unix/Command/_git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index bdb58e52c..afdd281d2 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -3729,7 +3729,7 @@ _git-send-email () { '(--format-patch )--no-format-patch[interpret ambiguous arguments file-name arguments]' \ '--quiet[be less verbose]' \ '( --no-validate)--validate[perform sanity checks on patches]' \ - '(--validate )--validate[do not perform sanity checks on patches]' \ + '(--validate )--no-validate[do not perform sanity checks on patches]' \ '--force[send emails even if safety checks would prevent it]' \ '*: :_files' } -- cgit v1.2.3 From a5333cc34431ae962265b9b10b8a6071f04c6c50 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sun, 1 Feb 2015 11:45:29 +0000 Subject: 34444: git completion: minor improvements - 'git rebase': complete arguments in the same word as the option - 'git commit': provide message for --fixup/--squash --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 2e2a014c0..a9cc4e3f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-02-02 Daniel Shahaf + + * 34444: Completion/Unix/Command/_git: git completion: minor + improvements to 'commit' and 'rebase' + 2015-02-01 Barton E. Schaefer * 34446: Doc/Zsh/mod_db_gdbm.yo, Src/Modules/db_gdbm.c: add diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index afdd281d2..9a78bf48c 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -651,8 +651,8 @@ _git-commit () { # TODO: --interactive isn't explicitly listed in the documentation. _arguments -w -S -s \ '(-a --all --interactive -o --only -i --include *)'{-a,--all}'[stage all modified and deleted paths]' \ - '--fixup=[construct a commit message for use with rebase --autosquash]:' \ - '--squash=[construct a commit message for use with rebase --autosquash]:' \ + '--fixup=[construct a commit message for use with rebase --autosquash]:commit to be amended:' \ + '--squash=[construct a commit message for use with rebase --autosquash]:commit to be amended:' \ $reset_author_opt \ '( --porcelain --dry-run)--short[output dry run in short format]' \ '(--short --dry-run)--porcelain[output dry run in porcelain-ready format]' \ @@ -1339,13 +1339,13 @@ _git-rebase () { '(-i --interactive --ignore-whitespace --whitespace --committer-date-is-author-date)'{-i,--interactive}'[make a list of commits to be rebased and open in $EDITOR]' \ '--edit-todo[edit interactive instruction sheet in an editor]' \ '(-p --preserve-merges --interactive)'{-p,--preserve-merges}'[try to recreate merges instead of ignoring them]' \ - {-x,--exec}'[with -i\: append "exec " after each line]:command' \ + {-x,--exec=}'[with -i\: append "exec " after each line]:command' \ '(1)--root[rebase all reachable commits]' \ $autosquash_opts \ '(--autostash --no-autostash)--autostash[stash uncommitted changes before rebasing and apply them afterwards]' \ '(--autostash --no-autostash)--no-autostash[do not stash uncommitted changes before rebasing and apply them afterwards]' \ '--no-ff[cherry-pick all rebased commits with --interactive, otherwise synonymous to --force-rebase]' \ - '--onto[start new branch with HEAD equal to given revision]:newbase:__git_revisions' \ + '--onto=[start new branch with HEAD equal to given revision]:newbase:__git_revisions' \ ':upstream branch:__git_revisions' \ '::working branch:__git_branch_names' } -- cgit v1.2.3 From ffaf99288fad178850c575d4025662b7252e56c1 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 8 Feb 2015 15:09:57 +0100 Subject: 34469: git completion: add "stash" from refs/stash to __git_heads --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 1 + 2 files changed, 6 insertions(+) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 002f52094..dffe88c88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-02-08 Daniel Hahler + + * 34469: Completion/Unix/Command/_git: git completion: add "stash" + from refs/stash to __git_heads + 2015-02-07 Daniel Shahaf * 34464: Completion/Unix/Command/_mtr: Update mtr completion diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 9a78bf48c..17c4d5792 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5621,6 +5621,7 @@ __git_heads () { for f in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do [[ -f $gitdir/$f ]] && heads+=$f done + [[ -f $gitdir/refs/stash ]] && heads+=stash fi _wanted heads expl head compadd "$@" -a - heads -- cgit v1.2.3 From 8f403ab25c7c31e53e7e02f7c44c414913fb7def Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 8 Feb 2015 15:16:00 +0100 Subject: 34467: completion: git: minor doc fixes I am not sure about the deprecation of user-commands, but from other places in the doc and commit history this deprecation was meant to be reverted?! --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 10 +++------- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 80d62f38e..b71b0cd28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ * 34470: Completion/Unix/Command/_adb: completion: adb: add "sideload" command + * 34467: Completion/Unix/Command/_git: completion: git: minor doc + fixes + 2015-02-07 Daniel Shahaf * 34464: Completion/Unix/Command/_mtr: Update mtr completion diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 17c4d5792..50eb4d365 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -4,7 +4,7 @@ # # Say you got your own git sub-commands (git will run a program `git-foo' # when you run "git foo") and you want "git f" to complete that sub -# commands name for you. You can make that sub-command know to the completion +# commands name for you. You can make that sub-command known to the completion # via the user-command style: # # % zstyle ':completion:*:*:git:*' user-commands foo:'description for foo' @@ -20,17 +20,13 @@ # completion as well. Place such a function inside an autoloaded #compdef file # and you should be all set. You can add a description to such a function by # adding a line matching -# +# # #description DESCRIPTION # # as the second line in the file. See # Completion/Debian/Command/_git-buildpackage in the Zsh sources for an # example. # -# As this solution is so much better than the user-commands zstyle method, the -# zstyle method is now DEPRECATED. It will most likely be removed in the next -# major release of Zsh (5.0). -# # When _git does not know a given sub-command (say `bar'), it falls back to # completing file names for all arguments to that sub command. I.e.: # @@ -5219,7 +5215,7 @@ _git_commands () { plumbing-sync-commands \ plumbing-sync-helper-commands \ plumbing-internal-helper-commands - + while _tags; do _requested aliases && \ -- cgit v1.2.3 From 7d15b9a9cb22972b5864523de5689aa05a8d61da Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 8 Feb 2015 15:17:58 +0100 Subject: 34468: completion: git: stash: handle 'save' being the default "git stash" should complete arguments for "git stash save", but without the message part. --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 16 +++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index b71b0cd28..fdb02a943 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,9 @@ * 34467: Completion/Unix/Command/_git: completion: git: minor doc fixes + * 34468: Completion/Unix/Command/_git: completion: git: stash: + handle 'save' being the default + 2015-02-07 Daniel Shahaf * 34464: Completion/Unix/Command/_mtr: Update mtr completion diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 50eb4d365..9552780c6 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1519,6 +1519,7 @@ _git-stash () { case $state in (command) local -a commands + local -a save_arguments commands=( save:'save your local modifications to a new stash' @@ -1531,19 +1532,24 @@ _git-stash () { drop:'remove a single stashed state from the stash list' create:'create a stash without storing it in the ref namespace') + save_arguments=( + '(--keep-index)--patch[interactively select hunks from diff between HEAD and working tree to stash]' \ + '( --no-keep-index)--keep-index[all changes already added to the index are left intact]' \ + '(--keep-index )--no-keep-index[all changes already added to the index are undone]' \ + '(-q --quiet)'{-q,--quiet}'[suppress all output]' \ + '(-u --include-untracked)'{-u,--include-untracked}'[include untracked files]' \ + ) _describe -t commands command commands && ret=0 + _arguments -S $save_arguments && ret=0 # "stash" defaults to "save", but without "message". ;; (option-or-argument) curcontext=${curcontext%:*}-$line[1]: case $line[1] in (save) + _arguments -S $save_arguments && ret=0 _arguments -S \ - '(--keep-index)--patch[interactively select hunks from diff between HEAD and working tree to stash]' \ - '( --no-keep-index)--keep-index[all changes already added to the index are left intact]' \ - '(--keep-index )--no-keep-index[all changes already added to the index are undone]' \ - '(-q --quiet)'{-q,--quiet}'[suppress all output]' \ - '(-u --include-untracked)'{-u,--include-untracked}'[include untracked files]' \ + $save_arguments \ ':: :_guard "([^-]?#|)" message' && ret=0 ;; (list) -- cgit v1.2.3 From ce80a925d69ed446d0cae8fb9c46f1f5398b8b93 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 6 Mar 2015 20:33:14 +0000 Subject: 34638 with tweaks: git completion: complete commit hashes and --fixup --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 757207ce7..cd470ee2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-03-07 Daniel Shahaf + + * 34638: Completion/Unix/Command/_git: 34638 with tweaks: + git completion: complete commit hashes and --fixup + 2015-03-05 Jun-ichi Takimoto * 34643: Doc/Zsh/builtins.yo, Doc/Zsh/zle.yo: clarify which diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 9552780c6..58d642216 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -647,8 +647,8 @@ _git-commit () { # TODO: --interactive isn't explicitly listed in the documentation. _arguments -w -S -s \ '(-a --all --interactive -o --only -i --include *)'{-a,--all}'[stage all modified and deleted paths]' \ - '--fixup=[construct a commit message for use with rebase --autosquash]:commit to be amended:' \ - '--squash=[construct a commit message for use with rebase --autosquash]:commit to be amended:' \ + '--fixup=[construct a commit message for use with rebase --autosquash]:commit to be amended:__git_commits' \ + '--squash=[construct a commit message for use with rebase --autosquash]:commit to be amended:__git_commits' \ $reset_author_opt \ '( --porcelain --dry-run)--short[output dry run in short format]' \ '(--short --dry-run)--porcelain[output dry run in porcelain-ready format]' \ @@ -5631,7 +5631,13 @@ __git_heads () { (( $+functions[__git_commit_objects] )) || __git_commit_objects () { - _guard '[[:xdigit:]](#c,40)' 'commit object name' + local gitdir expl start + declare -a commits + + : ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:%s')"}} + __git_command_successful $pipestatus || return 1 + + _describe -t commits 'commit object name' commits } (( $+functions[__git_blob_objects] )) || -- cgit v1.2.3 From 097dedf9ab549902d31e286a429b41246d5e2fbd Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sat, 7 Mar 2015 02:05:44 +0000 Subject: 34671: git completion: only offer recent commits' tags/heads for --fixup --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 22ff7a081..094d92e65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-03-16 Daniel Shahaf + + * 34671: Completion/Unix/Command/_git: git completion: only + offer recent commits' tags/heads for --fixup + 2015-03-15 Barton E. Schaefer * 34712: Doc/Zsh/grammar.yo: clarify words that may be aliased diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 58d642216..aa1124706 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -647,8 +647,8 @@ _git-commit () { # TODO: --interactive isn't explicitly listed in the documentation. _arguments -w -S -s \ '(-a --all --interactive -o --only -i --include *)'{-a,--all}'[stage all modified and deleted paths]' \ - '--fixup=[construct a commit message for use with rebase --autosquash]:commit to be amended:__git_commits' \ - '--squash=[construct a commit message for use with rebase --autosquash]:commit to be amended:__git_commits' \ + '--fixup=[construct a commit message for use with rebase --autosquash]:commit to be amended:__git_recent_commits' \ + '--squash=[construct a commit message for use with rebase --autosquash]:commit to be amended:__git_recent_commits' \ $reset_author_opt \ '( --porcelain --dry-run)--short[output dry run in short format]' \ '(--short --dry-run)--porcelain[output dry run in porcelain-ready format]' \ @@ -5640,6 +5640,38 @@ __git_commit_objects () { _describe -t commits 'commit object name' commits } +(( $+functions[__git_recent_commits] )) || +__git_recent_commits () { + local gitdir expl start + declare -a descr tags heads commits + local i j k + + # Careful: most %d will expand to the empty string. Quote properly! + : "${(A)commits::=${(@f)"$(_call_program commits git --no-pager log -20 --format='%h%n%d%n%s')"}}" + __git_command_successful $pipestatus || return 1 + + for i j k in "$commits[@]" ; do + descr+=($i:$k) + j=${${j# \(}%\)} # strip leading ' (' and trailing ')' + for j in ${(s:, :)j}; do + if [[ $j == 'tag: '* ]] ; then + tags+=( ${j#tag: } ) + else + heads+=( $j ) + fi + done + done + + ret=1 + # Resetting expl to avoid it 'leaking' from one line to the next. + expl=() + _wanted commit-tags expl 'commit tag' compadd "$@" -a - tags && ret=0 + expl=() + _wanted heads expl 'head' compadd "$@" -a - heads && ret=0 + expl=() + _describe -t commits 'commit object name' descr && ret=0 +} + (( $+functions[__git_blob_objects] )) || __git_blob_objects () { _guard '[[:xdigit:]](#c,40)' 'blob object name' -- cgit v1.2.3 From 236da69842863691098c4b2b603b93d3fcb90bb6 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sat, 7 Mar 2015 03:05:16 +0000 Subject: 34671 plus tweaks: Add -1 -2 -J -V -x to _describe, use them to sort 'git --fixup' hash completions --- ChangeLog | 4 ++++ Completion/Base/Utility/_describe | 35 ++++++++++++++++++++--------------- Completion/Unix/Command/_git | 2 +- Doc/Zsh/compsys.yo | 5 ++++- 4 files changed, 29 insertions(+), 17 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 094d92e65..9d399f014 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2015-03-16 Daniel Shahaf + * 34671 plus tweaks: Completion/Base/Utility/_describe + Completion/Unix/Command/_git Doc/Zsh/compsys.yo: Add -1 -2 -J -V + -x to _describe, use them to sort 'git --fixup' hash completions + * 34671: Completion/Unix/Command/_git: git completion: only offer recent commits' tags/heads for --fixup diff --git a/Completion/Base/Utility/_describe b/Completion/Base/Utility/_describe index 1a9f52f5d..ab7200517 100644 --- a/Completion/Base/Utility/_describe +++ b/Completion/Base/Utility/_describe @@ -6,23 +6,28 @@ local _opt _expl _tmpm _tmpd _mlen _noprefix local _type=values _descr _ret=1 _showd _nm _hide _args _grp _sep local csl="$compstate[list]" csl2 local _oargv _argv _new _strs _mats _opts _i _try=0 +local OPTIND OPTARG +local -a _jvx12 # Get the option. -if [[ "$1" = -o ]]; then - _type=options - shift -elif [[ "$1" = -O ]]; then - _type=options - _noprefix=1 - shift -elif [[ "$1" = -t ]]; then - _type="$2" - shift 2 -elif [[ "$1" = -t* ]]; then - _type="${1[3,-1]}" - shift -fi +while getopts "oOt:12JVx" _opt; do + case $_opt in + (o) + _type=options;; + (O) + _type=options + _noprefix=1 + ;; + (t) + _type="$OPTARG" + ;; + (1|2|J|V|x) + _jvx12+=(-$_opt) + esac +done +shift $(( OPTIND - 1 )) +unset _opt [[ "$_type$_noprefix" = options && ! -prefix [-+]* ]] && \ zstyle -T ":completion:${curcontext}:options" prefix-needed && @@ -53,7 +58,7 @@ fi _tags "$_type" while _tags; do - while _next_label "$_type" _expl "$_descr"; do + while _next_label $_jvx12 "$_type" _expl "$_descr"; do if (( $#_grp )); then diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index aa1124706..e5639fab2 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5669,7 +5669,7 @@ __git_recent_commits () { expl=() _wanted heads expl 'head' compadd "$@" -a - heads && ret=0 expl=() - _describe -t commits 'commit object name' descr && ret=0 + _describe -2Vx -t commits 'commit object name' descr && ret=0 } (( $+functions[__git_blob_objects] )) || diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 89cd05121..6c6bedb21 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -4140,7 +4140,7 @@ tt(compadd) when generating matches from the style value, or to the functions for the fields if they are called. ) findex(_describe) -item(tt(_describe) [ tt(-oO) | tt(-t) var(tag) ] var(descr) var(name1) [ var(name2) ] var(opts) ... tt(-)tt(-) ...)( +item(tt(_describe) [tt(-12JVx)] [ tt(-oO) | tt(-t) var(tag) ] var(descr) var(name1) [ var(name2) ] var(opts) ... tt(-)tt(-) ...)( This function associates completions with descriptions. Multiple groups separated by tt(-)tt(-) can be supplied, potentially with different completion options var(opts). @@ -4171,6 +4171,9 @@ tt(prefix-needed) style. With the tt(-t) option a var(tag) can be specified. The default is `tt(values)' or, if the tt(-o) option is given, `tt(options)'. +The options tt(-1), tt(-2), tt(-J), tt(-V), tt(-x) are passed to +tt(_next_label). + If selected by the tt(list-grouped) style, strings with the same description will appear together in the list. -- cgit v1.2.3 From e176eff554b592cd649a88cd7de23399755e43f4 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 19 Mar 2015 06:49:42 +0000 Subject: 34739: git completion: Fix regression in ce80a92 This restores the message when completing a commit object name that isn't one of the most recent 20 commits. e.g., 'git checkout deadbeef'. --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 37d7c7962..319cbb102 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-03-19 Daniel Shahaf + + * 34739: Completion/Unix/Command/_git: git completion: Fix + regression in ce80a92 (workers/34638) + 2015-03-18 Barton E. Schaefer * 34734: Doc/Zsh/grammar.yo, Src/lex.c, Test/A02alias.ztst: diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index e5639fab2..5524cb017 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5637,7 +5637,7 @@ __git_commit_objects () { : ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:%s')"}} __git_command_successful $pipestatus || return 1 - _describe -t commits 'commit object name' commits + _describe -t commits 'commit object name' commits || _guard '[[:xdigit:]](#c,40)' 'commit object name' } (( $+functions[__git_recent_commits] )) || -- cgit v1.2.3 From 0b79922edbd8a22343f91bc022ce2ad3dd00c5de Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 29 Mar 2015 05:51:57 +0000 Subject: 34762: completion: git: add short option for '--dir-diff' (_git-difftool) --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 2527e9e9e..feb7ca8e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-03-29 Daniel Hahler + + * 34762: Completion/Unix/Command/_git: completion: git: add + short option for '--dir-diff' (_git-difftool) + 2015-03-28 Barton E. Schaefer * 34804: Src/lex.c: refine 34734 POSIX_ALIAS change to preserve diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 5524cb017..9dafd3c97 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -3336,7 +3336,7 @@ _git-count-objects () { _git-difftool () { # TODO: Is this fine, or do we need to modify the context or similar? _git-diff \ - '--dir-diff[diff a whole tree by prepare a temporary copy]' \ + '(-d --dir-diff)'{-d,--dir-diff}'[diff a whole tree by preparing a temporary copy]' \ '(-y --no-prompt --prompt)'{-y,--no-prompt}'[do not prompt before invocation of diff tool]' \ '(-y --no-prompt)--prompt[prompt before invocation of diff tool]' \ '(-t --tool -x --extcmd)'{-t,--tool=-}'[merge resolution program to use]: :__git_difftools' \ -- cgit v1.2.3 From 727533088a42064d6b4e6d6c5ebe67dd457fb0da Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 1 Apr 2015 09:28:01 +0000 Subject: 34814: completion: git: Fix bug introduced by 236da69 Based on a patch by Daniel Hahler . --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index b506d9829..51078fb8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-04-01 Daniel Shahaf + + * 34814: Completion/Unix/Command/_git: completion: git: Fix + bug introduced by 34671 [based on patch by Daniel Hahler] + 2015-03-31 Peter Stephenson * users/20058: Completion/Unix/Command/_ip, diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 9dafd3c97..cc8fa65c3 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5651,7 +5651,9 @@ __git_recent_commits () { __git_command_successful $pipestatus || return 1 for i j k in "$commits[@]" ; do - descr+=($i:$k) + # Note: the after-the-colon part must be unique across the entire array; + # see workers/34768 + descr+=("$i:[$i] $k") j=${${j# \(}%\)} # strip leading ' (' and trailing ')' for j in ${(s:, :)j}; do if [[ $j == 'tag: '* ]] ; then -- cgit v1.2.3 From ca8edaba9265c5328322706a56bf664fd85e3af7 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 20 Mar 2015 02:11:40 +0100 Subject: 34748: completion: git: update list of builtintools --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 25 ++++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 8872e0d9f..2bf9db50f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-04-10 Daniel Hahler + + * 34748: Completion/Unix/Command/_git: completion: git: update + list of builtintools + 2015-04-07 Jun-ichi Takimoto * 34850: Doc/zman.yo, Doc/ztexi.yo, Doc/META-FAQ.yo, diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index cc8fa65c3..b11c83c67 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -6534,21 +6534,28 @@ __git_diff-or-merge-tools () { [[ $type == diff ]] && __git_config_get_regexp '^difftool\..+\.cmd$' userdifftools __git_config_get_regexp '^mergetool\..+\.cmd$' usermergetools builtintools=( + araxis + bc + bc3 + codecompare + deltawalker + diffmerge + diffuse + ecmerge + emerge + gvimdiff + gvimdiff2 + gvimdiff3 kdiff3 - tkdiff - xxdiff meld opendiff + p4merge + tkdiff + tortoisemerge vimdiff - gvimdiff vimdiff2 vimdiff3 - gvimdiff2 - emerge - ecmerge - diffuse - araxis - p4merge) + xxdiff) builtindifftools=($builtintools kompare) builtinmergetools=($builtintools tortoisemerge) -- cgit v1.2.3 From 7929dd8cbaa195311375712ebb12b85296783f58 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sat, 11 Apr 2015 10:13:55 +0000 Subject: 34885: completion: git: Fix another instance of the 34671 bug fixed in 34814 --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 504df73e2..8b92eb408 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-04-13 Daniel Shahaf + + * 34885: Completion/Unix/Command/_git: completion: git: Fix + another instance of the 34671 bug fixed in 34814 + 2015-04-13 Peter Stephenson * Han Pingtian: 34880: Doc/Zsh/options.yo: POSIX_TRAPS doc. diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index b11c83c67..365482c0b 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5634,7 +5634,9 @@ __git_commit_objects () { local gitdir expl start declare -a commits - : ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:%s')"}} + # Note: the after-the-colon part must be unique across the entire array; + # see workers/34768 + : ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:\\\[%h\\\]\ %s')"}} __git_command_successful $pipestatus || return 1 _describe -t commits 'commit object name' commits || _guard '[[:xdigit:]](#c,40)' 'commit object name' -- cgit v1.2.3 From 7793ebcb71919ed396e1291e975e7fc6483b2512 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 2 Apr 2015 13:28:58 +0000 Subject: 34885: completion: git: Sort "commit object" completions most recent first --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 8b92eb408..8fb76e88a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-04-13 Daniel Shahaf + * 34885: Completion/Unix/Command/_git: completion: git: Sort + "commit object" completions most recent first + * 34885: Completion/Unix/Command/_git: completion: git: Fix another instance of the 34671 bug fixed in 34814 diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 365482c0b..6a2da17a7 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5639,7 +5639,7 @@ __git_commit_objects () { : ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:\\\[%h\\\]\ %s')"}} __git_command_successful $pipestatus || return 1 - _describe -t commits 'commit object name' commits || _guard '[[:xdigit:]](#c,40)' 'commit object name' + _describe -V -t commits 'commit object name' commits || _guard '[[:xdigit:]](#c,40)' 'commit object name' } (( $+functions[__git_recent_commits] )) || -- cgit v1.2.3 From 122bb9a1259ec13110fd86aaea286d4a6e1726a0 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Mon, 13 Apr 2015 21:00:28 +0000 Subject: 34886: completion: git: Complete rebase --exec argument --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 8fb76e88a..fc7b92d99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-04-13 Daniel Shahaf + * 34886: Completion/Unix/Command/_git: completion: git: Complete + rebase --exec argument + * 34885: Completion/Unix/Command/_git: completion: git: Sort "commit object" completions most recent first diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 6a2da17a7..979e3e76f 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1335,7 +1335,7 @@ _git-rebase () { '(-i --interactive --ignore-whitespace --whitespace --committer-date-is-author-date)'{-i,--interactive}'[make a list of commits to be rebased and open in $EDITOR]' \ '--edit-todo[edit interactive instruction sheet in an editor]' \ '(-p --preserve-merges --interactive)'{-p,--preserve-merges}'[try to recreate merges instead of ignoring them]' \ - {-x,--exec=}'[with -i\: append "exec " after each line]:command' \ + {-x,--exec=}'[with -i\: append "exec " after each line]:command:_command_names -e' \ '(1)--root[rebase all reachable commits]' \ $autosquash_opts \ '(--autostash --no-autostash)--autostash[stash uncommitted changes before rebasing and apply them afterwards]' \ -- cgit v1.2.3