@matheusbsbs / matheus-bagliano / commits / 9f4cc6f76b
Fork 0

bash: Remove short option completions for branch/checkout/diff.

The short options (-l, -f, -d) for git-branch are rather silly to include in the completion generation as these options must be fully typed out by the user and most users already know what the options are anyway, so including them in the suggested completions does not offer huge value. (The same goes for git-checkout and git-diff.) Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Shawn O. Pearce committed Feb 4, 2007 at 02:38 UTC 9f4cc6f76b8a15a89b85a43e0c0016a64d368709
1 file changed +3 -3
contrib/completion/git-completion.bash
+3 -3
@@ -359,7 +359,7 @@ _git_apply ()
359 _git_branch ()
360 {
361 local cur="${COMP_WORDS[COMP_CWORD]}"
362 - COMPREPLY=($(compgen -W "-l -f -d -D $(__git_refs)" -- "$cur"))
362 + COMPREPLY=($(compgen -W "$(__git_refs)" -- "$cur"))
363 }
364
365 _git_cat_file ()
@@ -381,7 +381,7 @@ _git_cat_file ()
381 _git_checkout ()
382 {
383 local cur="${COMP_WORDS[COMP_CWORD]}"
384 - COMPREPLY=($(compgen -W "-l -b $(__git_refs)" -- "$cur"))
384 + COMPREPLY=($(compgen -W "$(__git_refs)" -- "$cur"))
385 }
386
387 _git_cherry_pick ()
@@ -421,7 +421,7 @@ _git_diff ()
421 _git_diff_tree ()
422 {
423 local cur="${COMP_WORDS[COMP_CWORD]}"
424 - COMPREPLY=($(compgen -W "-r -p -M $(__git_refs)" -- "$cur"))
424 + COMPREPLY=($(compgen -W "$(__git_refs)" -- "$cur"))
425 }
426
427 _git_fetch ()