summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8024ea6)
raw | patch | inline | side by side (parent: 8024ea6)
author | SZEDER Gábor <szeder@ira.uka.de> | |
Tue, 23 Feb 2010 21:03:00 +0000 (22:03 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 24 Feb 2010 16:32:31 +0000 (08:32 -0800) |
gitk aliases either start with "!gitk", or look something like "!sh -c
FOO=bar gitk", IOW they contain the "gitk" word. With this patch the
completion script will recognize these cases and will offer gitk's
options.
Just like the earlier change improving on aliased command recognition,
this change can also be fooled easily by some complex aliases, but
users of such aliases could remedy it with custom completion
functions.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
FOO=bar gitk", IOW they contain the "gitk" word. With this patch the
completion script will recognize these cases and will offer gitk's
options.
Just like the earlier change improving on aliased command recognition,
this change can also be fooled easily by some complex aliases, but
users of such aliases could remedy it with custom completion
functions.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash | patch | blob | history |
index 8593fd707b5e80b8d8833454744dbe261fa5e9e5..3029f160b013da4452fecf242b959265af9da988 100755 (executable)
config --get "alias.$1")
for word in $cmdline; do
case "$word" in
+ \!gitk|gitk)
+ echo "gitk"
+ return
+ ;;
\!*) : shell command alias ;;
-*) : option ;;
*=*) : setting env ;;
COMPREPLY=()
}
+_git_gitk ()
+{
+ _gitk
+}
+
_git_grep ()
{
__git_has_doubledash && return