MichaelAquilina / zsh-you-should-use

📎 ZSH plugin that reminds you to use existing aliases for commands you just typed
GNU General Public License v3.0
1.46k stars 43 forks source link

[Bug?] Tricky alias behavior triggers bad recommendations #29

Closed selfish closed 6 years ago

selfish commented 6 years ago

image

gl is the an alias for git pull, built in zsh. I actually have no idea where pd and pul are derived for, but a simple check for the length of the string can show that I have typed a shorter options than both.

MichaelAquilina commented 6 years ago

Would you mind printing out all your git aliases to help debug this?

git config --list | grep "^alias\.*"
selfish commented 6 years ago

Sure thing. :)

alias.com=commit
alias.cc=checkout
alias.new=checkout -b
alias.b=branch -a
alias.pd=pull origin dev
alias.pul=pull
alias.orogon=origin
alias.oprigin=origin
alias.ru=remote update --prune
alias.s=status
alias.sb=status -sb
alias.ststua=status
alias.ststus=status
alias.statua=status
alias.sup=! git branch --set-upstream-to=origin/$(git rev-parse --abbrev-ref HEAD) $(git rev-parse --abbrev-ref HEAD)
alias.slog=log --pretty=oneline --abbrev-commit
alias.graph=log --graph --oneline --decorate=short --branches='*'
alias.sani=! git ls-files | while read f; do tail -n1 $f | read -r _ || echo >> $f; done
alias.prunemerged=! git branch --merged | grep -v 'master\|dev' | awk '{print $1}' | xargs git branch -d
MichaelAquilina commented 6 years ago

could you just confirm the output of alias gl?

selfish commented 6 years ago
gl='git pull'