diff options
| author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-02-09 18:01:45 +0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-02-09 10:24:50 -0800 |
| commit | be3ce6b2505467d445c671feeb76e7ad1c40aee7 (patch) | |
| tree | f4017f5509cfd32fb09b4037b9988a231fe3f832 /contrib/completion/git-completion.bash | |
| parent | e1bea2c0d667d13b92919490757af388f2b441e4 (diff) | |
| download | git-be3ce6b2505467d445c671feeb76e7ad1c40aee7.tar.xz | |
completion: use __gitcomp_builtin in _git_am
The new completable options are:
--directory
--exclude
--gpg-sign
--include
--keep-cr
--keep-non-patch
--message-id
--no-keep-cr
--patch-format
--quiet
--reject
--resolvemsg=
In-progress options like --continue will be part of --git-completion-helper
then filtered out by _git_am() unless the operation is in progress. This
helps keep marking of these operations in just one place.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion/git-completion.bash')
| -rw-r--r-- | contrib/completion/git-completion.bash | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 1e0bd835fe..eba482eb9c 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1105,12 +1105,13 @@ __git_count_arguments () } __git_whitespacelist="nowarn warn error error-all fix" +__git_am_inprogress_options="--skip --continue --resolved --abort" _git_am () { __git_find_repo_path if [ -d "$__git_repo_path"/rebase-apply ]; then - __gitcomp "--skip --continue --resolved --abort" + __gitcomp "$__git_am_inprogress_options" return fi case "$cur" in @@ -1119,12 +1120,8 @@ _git_am () return ;; --*) - __gitcomp " - --3way --committer-date-is-author-date --ignore-date - --ignore-whitespace --ignore-space-change - --interactive --keep --no-utf8 --signoff --utf8 - --whitespace= --scissors - " + __gitcomp_builtin am "--no-utf8" \ + "$__git_am_inprogress_options" return esac } |
