summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6c36c9e)
raw | patch | inline | side by side (parent: 6c36c9e)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 14 Jul 2008 00:22:03 +0000 (00:22 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 14 Jul 2008 00:27:50 +0000 (17:27 -0700) |
When completing `git show origin/maint:Makef<tab>` we should add a
space after the filename has been completed, so that the user can
immediately begin the next argument.
I also added a special case for the symlink variant so we treat it
just like a normal blob, as there are no items below it in the Git
tree structure.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
space after the filename has been completed, so that the user can
immediately begin the next argument.
I also added a special case for the symlink variant so we treat it
just like a normal blob, as there are no items below it in the Git
tree structure.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash | patch | blob | history |
index 821c9a7f9f2b78f46c2f9ea87da72ff961c2cf9b..0a3bea44f7348ca0d21e0b8bfb704b748acf0bd0 100755 (executable)
ls="$ref"
;;
esac
+ local IFS=$'\n'
COMPREPLY=($(compgen -P "$pfx" \
-W "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
- | sed '/^100... blob /s,^.* ,,
+ | sed '/^100... blob /{
+ s,^.* ,,
+ s,$, ,
+ }
+ /^120000 blob /{
+ s,^.* ,,
+ s,$, ,
+ }
/^040000 tree /{
s,^.* ,,
s,$,/,