diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-05-14 11:50:57 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-14 11:50:57 -0700 |
commit | fca9249b86411718a66835fe5107219b49c1767f (patch) | |
tree | cc0263681bf86258644e88b9b51e35f35f0121fb /contrib/completion | |
parent | Merge branch 'nd/threaded-index-pack' (diff) | |
parent | completion: simplify __git_complete_revlist_file (diff) | |
download | tgif-fca9249b86411718a66835fe5107219b49c1767f.tar.xz |
Merge branch 'fc/simplify-complete-revlist-file'
By Felipe Contreras
* fc/simplify-complete-revlist-file:
completion: simplify __git_complete_revlist_file
Diffstat (limited to 'contrib/completion')
-rwxr-xr-x | contrib/completion/git-completion.bash | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 9f56ec7a6b..2f60825b21 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -676,9 +676,7 @@ __git_complete_revlist_file () *) pfx="$ref:$pfx" ;; esac - local IFS=$'\n' - COMPREPLY=($(compgen -P "$pfx" \ - -W "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \ + __gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \ | sed '/^100... blob /{ s,^.* ,, s,$, , @@ -692,7 +690,7 @@ __git_complete_revlist_file () s,$,/, } s/^.* //')" \ - -- "$cur_")) + "$pfx" "$cur_" "" ;; *...*) pfx="${cur_%...*}..." |