summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 873537f)
raw | patch | inline | side by side (parent: 873537f)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 5 Nov 2006 11:24:56 +0000 (06:24 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 5 Nov 2006 21:36:36 +0000 (13:36 -0800) |
Now that log, whatchanged, rev-list, etc. support the symmetric
difference operator '...' we should provide bash completion for it
just like we do for '..'.
While we are at it we can remove two sed invocations during the
interactive prompt and replace them with internal bash operations.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
difference operator '...' we should provide bash completion for it
just like we do for '..'.
While we are at it we can remove two sed invocations during the
interactive prompt and replace them with internal bash operations.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
contrib/completion/git-completion.bash | patch | blob | history |
index f258f2f03e4a1ce2986c4d2fb645f7a895a90d3d..e4a32b61b279a8260e4de8175cc6f8885c833937 100755 (executable)
_git_log ()
{
- local cur="${COMP_WORDS[COMP_CWORD]}"
+ local pfx cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
+ *...*)
+ pfx="${cur%...*}..."
+ cur="${cur#*...}"
+ COMPREPLY=($(compgen -P "$pfx" -W "$(__git_refs)" -- "$cur"))
+ ;;
*..*)
- local pfx=$(echo "$cur" | sed 's/\.\..*$/../')
- cur=$(echo "$cur" | sed 's/^.*\.\.//')
+ pfx="${cur%..*}.."
+ cur="${cur#*..}"
COMPREPLY=($(compgen -P "$pfx" -W "$(__git_refs)" -- "$cur"))
;;
*)