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.41k stars 44 forks source link

Allow ignoring global aliases #94

Closed nawordar closed 4 years ago

nawordar commented 4 years ago

Issue Details

Please provide the following details when opening an issue:

Operating System (uname -a)

Linux nawordar-H81M-S1 5.3.0-26-generic #28-Ubuntu SMP Wed Dec 18 05:37:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

zsh version (zsh --version)

zsh 5.7.1 (x86_64-ubuntu-linux-gnu)

you-should-use version (echo "$YSU_VERSION")

1.6.0

How is zsh-you-should-use installed?

Just FYI I am using both oh-my-zsh and zplug, but I installed zsh-you-should-use with zplug.

Steps to reproduce the issue

  1. Add a global alias to the YSU_IGNORED_ALIASES
  2. you-should-use still notifies about not using the alias

gist link to your zshrc

https://github.com/nawordar/dotfiles/blob/a62356198c9998adbf0f6e2bc0c367df893a3f51/dot_zshrc

I don't use ... alias because it doesn't play well with auto-completion. Because of that, I wanted to disable it through the YSU_IGNORED_ALIASES variable in .zshrc like this:

export YSU_IGNORED_ALIASES=("...")

Unfortunately, while it works for normal aliases, it doesn't work for the global ones, so it still notifies me about this alias.

> YSU_IGNORED_ALIASES=('...')
> ls ../..                   
Found existing global alias for "../..". You should use: "..."
MichaelAquilina commented 4 years ago

Support has been released in version 1.7.0

use the environment variable YSU_IGNORED_GLOBAL_VARIABLES (Check the README for more info)

nawordar commented 4 years ago

Wow, that was fast! Thank you