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

"Best Match" should take into account all alias types #30

Closed selfish closed 6 years ago

selfish commented 6 years ago

image

While here I typed a bad command anyway (my ignorance using autocomplete), I'd expect to only see the first suggestion, I'll never want to type git s because then I should see the gst suggestion, so even display it?

This may not be a feature suited for all, but I'd love it as a config option.

MichaelAquilina commented 6 years ago

@selfish take a look here and see if this section answers your question: https://github.com/MichaelAquilina/zsh-you-should-use#displaying-results

MichaelAquilina commented 6 years ago

Actually, this might be a legitimate bug as it doesnt cater for git and global aliases....

selfish commented 6 years ago

I'll try it, thanks for the referral. I'll use export YSU_MODE=BESTMATCH, but please let me know - do I just stick it in my .zshrc before the plugin load?

MichaelAquilina commented 6 years ago

it can be anywhere in your .zshrc file :)

selfish commented 6 years ago

Same result after putting it at the top. (I did of course, tried to re-source the file, and also tried a fresh terminal window)

MichaelAquilina commented 6 years ago

Yeah this is definitely a bug. I will try look into it tonight if I get the chance. Thanks for the report!

selfish commented 6 years ago

Much obliged. Your plugin is gold, but your response time is priceless. Thank you!