Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer the shortest command when there are multiple possible aliases #62

Open
apaatsio opened this issue May 27, 2022 · 3 comments
Open

Comments

@apaatsio
Copy link

Let's define two "overlapping" aliases (I'm using these via https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git)

alias g='git'
alias gsta='git stash save'

Current behavior

$ git stash save                                                                                                          
Alias tip: g stash save

Preferred behavior

$ git stash save                                                                                                          
Alias tip: gsta

gsta is 4 characters and g stash save is 12 characters, so gsta should be preferred.

@mrienstra
Copy link
Contributor

@djui, are you open to a PR for this? Tempted to work on it when I have time. Er, unless @apaatsio is hoping to do so, I don't want to deprive anyone of fun times.

@apaatsio
Copy link
Author

apaatsio commented Nov 3, 2022

@mrienstra Please, go ahead and have fun.

@djui
Copy link
Owner

djui commented Nov 3, 2022

@mrienstra Yes ofc! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants