зеркало из https://github.com/microsoft/git.git
Merge branch 'fc/simplify-complete-revlist-file'
By Felipe Contreras * fc/simplify-complete-revlist-file: completion: simplify __git_complete_revlist_file
This commit is contained in:
Коммит
fca9249b86
|
@ -676,9 +676,7 @@ __git_complete_revlist_file ()
|
||||||
*) pfx="$ref:$pfx" ;;
|
*) pfx="$ref:$pfx" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
local IFS=$'\n'
|
__gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
|
||||||
COMPREPLY=($(compgen -P "$pfx" \
|
|
||||||
-W "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
|
|
||||||
| sed '/^100... blob /{
|
| sed '/^100... blob /{
|
||||||
s,^.* ,,
|
s,^.* ,,
|
||||||
s,$, ,
|
s,$, ,
|
||||||
|
@ -692,7 +690,7 @@ __git_complete_revlist_file ()
|
||||||
s,$,/,
|
s,$,/,
|
||||||
}
|
}
|
||||||
s/^.* //')" \
|
s/^.* //')" \
|
||||||
-- "$cur_"))
|
"$pfx" "$cur_" ""
|
||||||
;;
|
;;
|
||||||
*...*)
|
*...*)
|
||||||
pfx="${cur_%...*}..."
|
pfx="${cur_%...*}..."
|
||||||
|
|
Загрузка…
Ссылка в новой задаче