İlk önce git stash show
yazdım. Git stash show stash yazarken otomatik tamamlama sorunu @ {1}
git stash show [email protected]{
göstermektedir.
Ama ve sekme yazdıktan sonra, bu git stash show [email protected]{1}
hale gelebilir ve bunun bariz yanlıştır.
Aşağıdaki kodda .git-completion.bash'da yanlış olabileceğini düşünüyorum, ancak bunu okuyamıyorum.
_git_stash()
{
local save_opts='--keep-index --no-keep-index --quiet --patch'
local subcommands='save list show apply clear drop pop create branch'
local subcommand="$(__git_find_on_cmdline "$subcommands")"
if [ -z "$subcommand" ]; then
case "$cur" in
--*)
__gitcomp "$save_opts"
;;
*)
if [ -z "$(__git_find_on_cmdline "$save_opts")" ]; then
__gitcomp "$subcommands"
else
COMPREPLY=()
fi
;;
esac
else
case "$subcommand,$cur" in
save,--*)
__gitcomp "$save_opts"
;;
apply,--*|pop,--*)
__gitcomp "--index --quiet"
;;
show,--*|drop,--*|branch,--*)
COMPREPLY=()
;;
show,*|apply,*|drop,*|pop,*|branch,*)
__gitcomp_nl "$(git --git-dir="$(__gitdir)" stash list \
| sed -n -e 's/:.*//p')"
;;
*)
COMPREPLY=()
;;
esac
fi
}
Bunu nasıl düzelteceğini bilen var mı?
Bash sürümü: GNU bash, sürüm 4.2.37 (2) -release (i386-apple-darwin12.0.0).
git sürümü: 1.8.0.3
bütün kaynak: https://gist.github.com/pktangyue/5477924
Bash '4.1.10 (1)' kullanıyorum./Etc/bash-completion.d/git-completion.sh' içinde tanımlanmış aynı tamamlama işlevine sahibim ve tamamlama benim için iyi çalışıyor. Bash versiyonunuz hakkında bilgi verebilir misiniz? Ayrıca eğer bir linke (eğer bir gist olabilir?) Tüm 'git-completion.sh' için gönderebilirseniz, karşılaştırma yapmak yararlı olabilir. – Tuxdude
@Tuxdude daha fazla bilgi ekledi. – pktangyue
En az 10 stashınız olduğunu topladım? Durumunu çoğaltmaya çalışıyorum. Bu problemi iki stash ile yaşamadım (git 1.8.2.3, bash 4.2.45, Arch Linux x86_64). – kampu