* [PATCH 0/8] bash completion: more porcelain completions @ 2008-08-05 5:50 Lee Marlow 2008-08-05 5:50 ` [PATCH 1/8] bash completion: Add completion for 'git clone' Lee Marlow 2008-08-05 14:29 ` [PATCH 0/8] bash completion: more porcelain completions Shawn O. Pearce 0 siblings, 2 replies; 13+ messages in thread From: Lee Marlow @ 2008-08-05 5:50 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: git, Lee Marlow This adds basic long option completion for some common commands that I use, as well as stash name completion. Lee Marlow (8): bash completion: Add completion for 'git clone' bash completion: Add completion for 'git clean' bash completion: Add completion for 'git init' bash completion: Add completion for 'git revert' bash completion: More completions for 'git stash' bash completion: Add completion for 'git archive' bash completion: Add completion for 'git ls-files' bash completion: Add completion for 'git mv' contrib/completion/git-completion.bash | 143 +++++++++++++++++++++++++++++++- git-stash.sh | 2 +- 2 files changed, 143 insertions(+), 2 deletions(-) ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/8] bash completion: Add completion for 'git clone' 2008-08-05 5:50 [PATCH 0/8] bash completion: more porcelain completions Lee Marlow @ 2008-08-05 5:50 ` Lee Marlow 2008-08-05 5:50 ` [PATCH 2/8] bash completion: Add completion for 'git clean' Lee Marlow 2008-08-05 14:29 ` [PATCH 0/8] bash completion: more porcelain completions Shawn O. Pearce 1 sibling, 1 reply; 13+ messages in thread From: Lee Marlow @ 2008-08-05 5:50 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: git, Lee Marlow Added completions for all long options specified in the docs --local --no-hardlinks --shared --reference --quiet --no-checkout --bare --mirror --origin --upload-pack --template= --depth Signed-off-by: Lee Marlow <lee.marlow@gmail.com> --- contrib/completion/git-completion.bash | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 678a155..6ffe259 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -667,6 +667,31 @@ _git_cherry_pick () esac } +_git_clone () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + case "$cur" in + --*) + __gitcomp " + --local + --no-hardlinks + --shared + --reference + --quiet + --no-checkout + --bare + --mirror + --origin + --upload-pack + --template= + --depth + " + return + ;; + esac + COMPREPLY=() +} + _git_commit () { __git_has_doubledash && return @@ -1475,6 +1500,7 @@ _git () checkout) _git_checkout ;; cherry) _git_cherry ;; cherry-pick) _git_cherry_pick ;; + clone) _git_clone ;; commit) _git_commit ;; config) _git_config ;; describe) _git_describe ;; -- 1.6.0.rc1.48.g2b6032 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/8] bash completion: Add completion for 'git clean' 2008-08-05 5:50 ` [PATCH 1/8] bash completion: Add completion for 'git clone' Lee Marlow @ 2008-08-05 5:50 ` Lee Marlow 2008-08-05 5:50 ` [PATCH 3/8] bash completion: Add completion for 'git init' Lee Marlow 0 siblings, 1 reply; 13+ messages in thread From: Lee Marlow @ 2008-08-05 5:50 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: git, Lee Marlow Added completions for all long options specified in the docs --dry-run --quiet Signed-off-by: Lee Marlow <lee.marlow@gmail.com> --- contrib/completion/git-completion.bash | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 6ffe259..72be4f1 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -667,6 +667,20 @@ _git_cherry_pick () esac } +_git_clean () +{ + __git_has_doubledash && return + + local cur="${COMP_WORDS[COMP_CWORD]}" + case "$cur" in + --*) + __gitcomp "--dry-run --quiet" + return + ;; + esac + COMPREPLY=() +} + _git_clone () { local cur="${COMP_WORDS[COMP_CWORD]}" @@ -1500,6 +1514,7 @@ _git () checkout) _git_checkout ;; cherry) _git_cherry ;; cherry-pick) _git_cherry_pick ;; + clean) _git_clean ;; clone) _git_clone ;; commit) _git_commit ;; config) _git_config ;; -- 1.6.0.rc1.48.g2b6032 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/8] bash completion: Add completion for 'git init' 2008-08-05 5:50 ` [PATCH 2/8] bash completion: Add completion for 'git clean' Lee Marlow @ 2008-08-05 5:50 ` Lee Marlow 2008-08-05 5:50 ` [PATCH 4/8] bash completion: Add completion for 'git revert' Lee Marlow 0 siblings, 1 reply; 13+ messages in thread From: Lee Marlow @ 2008-08-05 5:50 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: git, Lee Marlow Added completions for all long options specified in the docs --quiet --bare --template= --shared --shared={false|true|umask|group|all|world|everybody} Signed-off-by: Lee Marlow <lee.marlow@gmail.com> --- contrib/completion/git-completion.bash | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 72be4f1..c7a6d92 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -842,6 +842,24 @@ _git_help () __gitcomp "$(__git_all_commands)" } +_git_init () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + case "$cur" in + --shared=*) + __gitcomp " + false true umask group all world everybody + " "" "${cur##--shared=}" + return + ;; + --*) + __gitcomp "--quiet --bare --template= --shared --shared=" + return + ;; + esac + COMPREPLY=() +} + _git_ls_remote () { __gitcomp "$(__git_remotes)" @@ -1524,6 +1542,7 @@ _git () format-patch) _git_format_patch ;; gc) _git_gc ;; help) _git_help ;; + init) _git_init ;; log) _git_log ;; ls-remote) _git_ls_remote ;; ls-tree) _git_ls_tree ;; -- 1.6.0.rc1.48.g2b6032 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/8] bash completion: Add completion for 'git revert' 2008-08-05 5:50 ` [PATCH 3/8] bash completion: Add completion for 'git init' Lee Marlow @ 2008-08-05 5:50 ` Lee Marlow 2008-08-05 5:50 ` [PATCH 5/8] bash completion: More completions for 'git stash' Lee Marlow 0 siblings, 1 reply; 13+ messages in thread From: Lee Marlow @ 2008-08-05 5:50 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: git, Lee Marlow Added completions for all long options specified in the docs --edit --mainline --no-edit --no-commit --signoff Signed-off-by: Lee Marlow <lee.marlow@gmail.com> --- contrib/completion/git-completion.bash | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index c7a6d92..6a5c4cd 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1264,6 +1264,18 @@ _git_reset () __gitcomp "$(__git_refs)" } +_git_revert () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + case "$cur" in + --*) + __gitcomp "--edit --mainline --no-edit --no-commit --signoff" + return + ;; + esac + COMPREPLY=() +} + _git_rm () { __git_has_doubledash && return @@ -1554,6 +1566,7 @@ _git () rebase) _git_rebase ;; remote) _git_remote ;; reset) _git_reset ;; + revert) _git_revert ;; rm) _git_rm ;; send-email) _git_send_email ;; shortlog) _git_shortlog ;; -- 1.6.0.rc1.48.g2b6032 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/8] bash completion: More completions for 'git stash' 2008-08-05 5:50 ` [PATCH 4/8] bash completion: Add completion for 'git revert' Lee Marlow @ 2008-08-05 5:50 ` Lee Marlow 2008-08-05 5:50 ` [PATCH 6/8] bash completion: Add completion for 'git archive' Lee Marlow 2008-08-06 15:45 ` [PATCH] bash: remove redundant check for 'git stash apply' options SZEDER Gábor 0 siblings, 2 replies; 13+ messages in thread From: Lee Marlow @ 2008-08-05 5:50 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: git, Lee Marlow Add branch subcommand to completions and USAGE for git-stash.sh. Complete stash names for show, apply, drop, pop, and branch. Add "--index" long option for apply. Signed-off-by: Lee Marlow <lee.marlow@gmail.com> --- contrib/completion/git-completion.bash | 12 +++++++++++- git-stash.sh | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 6a5c4cd..a292cbd 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1348,7 +1348,7 @@ _git_show_branch () _git_stash () { - local subcommands='save list show apply clear drop pop create' + local subcommands='save list show apply clear drop pop create branch' local subcommand="$(__git_find_subcommand "$subcommands")" if [ -z "$subcommand" ]; then __gitcomp "$subcommands" @@ -1358,6 +1358,16 @@ _git_stash () save,--*) __gitcomp "--keep-index" ;; + apply,--*) + __gitcomp "--index" + ;; + show,--*|apply,--*|drop,--*|pop,--*|branch,--*) + COMPREPLY=() + ;; + show,*|apply,*|drop,*|pop,*|branch,*) + __gitcomp "$(git --git-dir="$(__gitdir)" stash list \ + | sed -n -e 's/:.*//p')" + ;; *) COMPREPLY=() ;; diff --git a/git-stash.sh b/git-stash.sh index d4609ed..5ad2c4b 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (c) 2007, Nanako Shiraishi -USAGE='[ | save | list | show | apply | clear | drop | pop | create ]' +USAGE='[ | save | list | show | apply | clear | drop | pop | create | branch ]' SUBDIRECTORY_OK=Yes OPTIONS_SPEC= -- 1.6.0.rc1.48.g2b6032 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 6/8] bash completion: Add completion for 'git archive' 2008-08-05 5:50 ` [PATCH 5/8] bash completion: More completions for 'git stash' Lee Marlow @ 2008-08-05 5:50 ` Lee Marlow 2008-08-05 5:50 ` [PATCH 7/8] bash completion: Add completion for 'git ls-files' Lee Marlow 2008-08-06 15:45 ` [PATCH] bash: remove redundant check for 'git stash apply' options SZEDER Gábor 1 sibling, 1 reply; 13+ messages in thread From: Lee Marlow @ 2008-08-05 5:50 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: git, Lee Marlow Added completions for all long options specified in the docs --format= --list --verbose --prefix= --remote= --exec= The --format= long option can be completed with available formats and the --remote= can be completed with defined remote repositories. Signed-off-by: Lee Marlow <lee.marlow@gmail.com> --- contrib/completion/git-completion.bash | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index a292cbd..61ea6d9 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -561,6 +561,29 @@ _git_add () COMPREPLY=() } +_git_archive () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + case "$cur" in + --format=*) + __gitcomp "$(git archive --list)" "" "${cur##--format=}" + return + ;; + --remote=*) + __gitcomp "$(__git_remotes)" "" "${cur##--remote=}" + return + ;; + --*) + __gitcomp " + --format= --list --verbose + --prefix= --remote= --exec= + " + return + ;; + esac + __git_complete_file +} + _git_bisect () { __git_has_doubledash && return @@ -1548,6 +1571,7 @@ _git () am) _git_am ;; add) _git_add ;; apply) _git_apply ;; + archive) _git_archive ;; bisect) _git_bisect ;; bundle) _git_bundle ;; branch) _git_branch ;; -- 1.6.0.rc1.48.g2b6032 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 7/8] bash completion: Add completion for 'git ls-files' 2008-08-05 5:50 ` [PATCH 6/8] bash completion: Add completion for 'git archive' Lee Marlow @ 2008-08-05 5:50 ` Lee Marlow 0 siblings, 0 replies; 13+ messages in thread From: Lee Marlow @ 2008-08-05 5:50 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: git, Lee Marlow Added completions for all long options specified in the docs --cached --deleted --modified --others --ignored --stage --directory --no-empty-directory --unmerged --killed --exclude= --exclude-from= --exclude-per-directory= --exclude-standard --error-unmatch --with-tree= --full-name --abbrev --ignored --exclude-per-directory Signed-off-by: Lee Marlow <lee.marlow@gmail.com> --- contrib/completion/git-completion.bash | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 61ea6d9..936cd35 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -883,6 +883,26 @@ _git_init () COMPREPLY=() } +_git_ls_files () +{ + __git_has_doubledash && return + + local cur="${COMP_WORDS[COMP_CWORD]}" + case "$cur" in + --*) + __gitcomp "--cached --deleted --modified --others --ignored + --stage --directory --no-empty-directory --unmerged + --killed --exclude= --exclude-from= + --exclude-per-directory= --exclude-standard + --error-unmatch --with-tree= --full-name + --abbrev --ignored --exclude-per-directory + " + return + ;; + esac + COMPREPLY=() +} + _git_ls_remote () { __gitcomp "$(__git_remotes)" @@ -1590,6 +1610,7 @@ _git () help) _git_help ;; init) _git_init ;; log) _git_log ;; + ls-files) _git_ls_files ;; ls-remote) _git_ls_remote ;; ls-tree) _git_ls_tree ;; merge) _git_merge;; -- 1.6.0.rc1.48.g2b6032 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH] bash: remove redundant check for 'git stash apply' options 2008-08-05 5:50 ` [PATCH 5/8] bash completion: More completions for 'git stash' Lee Marlow 2008-08-05 5:50 ` [PATCH 6/8] bash completion: Add completion for 'git archive' Lee Marlow @ 2008-08-06 15:45 ` SZEDER Gábor 2008-08-06 15:47 ` Shawn O. Pearce 1 sibling, 1 reply; 13+ messages in thread From: SZEDER Gábor @ 2008-08-06 15:45 UTC (permalink / raw) To: Lee Marlow, Shawn O. Pearce; +Cc: git, Junio C Hamano, SZEDER Gábor It will never trigger anyway because of the first check, and even if it would, it would not offer the command line option. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> --- contrib/completion/git-completion.bash | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 447cb06..5d60f82 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1427,7 +1427,7 @@ _git_stash () apply,--*) __gitcomp "--index" ;; - show,--*|apply,--*|drop,--*|pop,--*|branch,--*) + show,--*|drop,--*|pop,--*|branch,--*) COMPREPLY=() ;; show,*|apply,*|drop,*|pop,*|branch,*) -- 1.6.0.rc1.104.gf5b36 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] bash: remove redundant check for 'git stash apply' options 2008-08-06 15:45 ` [PATCH] bash: remove redundant check for 'git stash apply' options SZEDER Gábor @ 2008-08-06 15:47 ` Shawn O. Pearce 0 siblings, 0 replies; 13+ messages in thread From: Shawn O. Pearce @ 2008-08-06 15:47 UTC (permalink / raw) To: SZEDER GGGbor; +Cc: Lee Marlow, git, Junio C Hamano SZEDER GGGbor <szeder@ira.uka.de> wrote: > It will never trigger anyway because of the first check, and even if it > would, it would not offer the command line option. > > Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Oops. I should have caught that. ACK. > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash > index 447cb06..5d60f82 100755 > --- a/contrib/completion/git-completion.bash > +++ b/contrib/completion/git-completion.bash > @@ -1427,7 +1427,7 @@ _git_stash () > apply,--*) > __gitcomp "--index" > ;; > - show,--*|apply,--*|drop,--*|pop,--*|branch,--*) > + show,--*|drop,--*|pop,--*|branch,--*) > COMPREPLY=() > ;; > show,*|apply,*|drop,*|pop,*|branch,*) -- Shawn. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/8] bash completion: more porcelain completions 2008-08-05 5:50 [PATCH 0/8] bash completion: more porcelain completions Lee Marlow 2008-08-05 5:50 ` [PATCH 1/8] bash completion: Add completion for 'git clone' Lee Marlow @ 2008-08-05 14:29 ` Shawn O. Pearce 2008-08-05 18:58 ` Junio C Hamano 1 sibling, 1 reply; 13+ messages in thread From: Shawn O. Pearce @ 2008-08-05 14:29 UTC (permalink / raw) To: Lee Marlow; +Cc: git Lee Marlow <lee.marlow@gmail.com> wrote: > This adds basic long option completion for some common commands that I > use, as well as stash name completion. Entire series is good. Acked-by: Shawn O. Pearce <spearce@spearce.org> > Lee Marlow (8): > bash completion: Add completion for 'git clone' > bash completion: Add completion for 'git clean' > bash completion: Add completion for 'git init' > bash completion: Add completion for 'git revert' > bash completion: More completions for 'git stash' > bash completion: Add completion for 'git archive' > bash completion: Add completion for 'git ls-files' > bash completion: Add completion for 'git mv' > > contrib/completion/git-completion.bash | 143 +++++++++++++++++++++++++++++++- > git-stash.sh | 2 +- > 2 files changed, 143 insertions(+), 2 deletions(-) > -- Shawn. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/8] bash completion: more porcelain completions 2008-08-05 14:29 ` [PATCH 0/8] bash completion: more porcelain completions Shawn O. Pearce @ 2008-08-05 18:58 ` Junio C Hamano 2008-08-05 19:09 ` Shawn O. Pearce 0 siblings, 1 reply; 13+ messages in thread From: Junio C Hamano @ 2008-08-05 18:58 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: Lee Marlow, git "Shawn O. Pearce" <spearce@spearce.org> writes: > Lee Marlow <lee.marlow@gmail.com> wrote: >> This adds basic long option completion for some common commands that I >> use, as well as stash name completion. > > Entire series is good. > > Acked-by: Shawn O. Pearce <spearce@spearce.org> Have you looked at the last one [PATCH 8/8]? I do not seem to have it. >> Lee Marlow (8): >> bash completion: Add completion for 'git clone' >> bash completion: Add completion for 'git clean' >> bash completion: Add completion for 'git init' >> bash completion: Add completion for 'git revert' >> bash completion: More completions for 'git stash' >> bash completion: Add completion for 'git archive' >> bash completion: Add completion for 'git ls-files' >> bash completion: Add completion for 'git mv' >> >> contrib/completion/git-completion.bash | 143 +++++++++++++++++++++++++++++++- >> git-stash.sh | 2 +- >> 2 files changed, 143 insertions(+), 2 deletions(-) >> > > -- > Shawn. > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/8] bash completion: more porcelain completions 2008-08-05 18:58 ` Junio C Hamano @ 2008-08-05 19:09 ` Shawn O. Pearce 0 siblings, 0 replies; 13+ messages in thread From: Shawn O. Pearce @ 2008-08-05 19:09 UTC (permalink / raw) To: Junio C Hamano; +Cc: Lee Marlow, git Junio C Hamano <gitster@pobox.com> wrote: > "Shawn O. Pearce" <spearce@spearce.org> writes: > > Lee Marlow <lee.marlow@gmail.com> wrote: > >> This adds basic long option completion for some common commands that I > >> use, as well as stash name completion. > > > > Entire series is good. > > > > Acked-by: Shawn O. Pearce <spearce@spearce.org> > > Have you looked at the last one [PATCH 8/8]? I do not seem to have it. Yes. I just sent it back to you and the list. Hopefully at least one copy makes it. ;-) -- Shawn. ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2008-08-06 15:48 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-08-05 5:50 [PATCH 0/8] bash completion: more porcelain completions Lee Marlow 2008-08-05 5:50 ` [PATCH 1/8] bash completion: Add completion for 'git clone' Lee Marlow 2008-08-05 5:50 ` [PATCH 2/8] bash completion: Add completion for 'git clean' Lee Marlow 2008-08-05 5:50 ` [PATCH 3/8] bash completion: Add completion for 'git init' Lee Marlow 2008-08-05 5:50 ` [PATCH 4/8] bash completion: Add completion for 'git revert' Lee Marlow 2008-08-05 5:50 ` [PATCH 5/8] bash completion: More completions for 'git stash' Lee Marlow 2008-08-05 5:50 ` [PATCH 6/8] bash completion: Add completion for 'git archive' Lee Marlow 2008-08-05 5:50 ` [PATCH 7/8] bash completion: Add completion for 'git ls-files' Lee Marlow 2008-08-06 15:45 ` [PATCH] bash: remove redundant check for 'git stash apply' options SZEDER Gábor 2008-08-06 15:47 ` Shawn O. Pearce 2008-08-05 14:29 ` [PATCH 0/8] bash completion: more porcelain completions Shawn O. Pearce 2008-08-05 18:58 ` Junio C Hamano 2008-08-05 19:09 ` Shawn O. Pearce
Code repositories for project(s) associated with this public inbox https://80x24.org/mirrors/git.git 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 read-only IMAP folder(s) and NNTP newsgroup(s).