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

You Should Use reminder fires even when I use the correct alias #88

Closed jcklpe closed 4 years ago

jcklpe commented 4 years ago

Issue Details

Please provide the following details when opening an issue:

Operating System (uname -a)

Windows WSL Linux Goffe 4.4.0-17763-Microsoft #379-Microsoft Wed Mar 06 19:16:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux

zsh version

zsh 5.4.2 (x86_64-ubuntu-linux-gnu)

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

1.5.0

How is zsh-you-should-use installed?

Steps to reproduce the issue

┌─    ~                                                                                                                                
└─➤ .. 
Found existing alias for "cd ..". You should use: ".." 
aslan 

┌─    |  /home                                                                                                                        
└─➤ .. 
Found existing alias for "cd ..". You should use: ".." 
bin  boot  dev  etc  home  init  lib  lib64  media  mnt  opt  proc  root  run  sbin  snap  srv  sys  tmp  usr  var 

┌─    |  /                                                                                                                            
└─➤ 

gist link to your zshrc

https://github.com/jcklpe/configs/blob/master/zsh/.zshrc

MichaelAquilina commented 4 years ago

Hi @jcklpe. This is a known issue in the 1.5.0 release. Please update to the latest version and the problem should go away

MichaelAquilina commented 4 years ago

Going to close this issue. Let me know if you still see this problem on the latest version!

jcklpe commented 4 years ago

@MichaelAquilina

┌─    /mnt/c/Users/aslan/home/Documents/configs/zsh/zsh-plugins/zsh-you-should-use                                         master   
└─➤ git status 
On branch master 
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

┌─    /mnt/c/Users/aslan/home/Documents                                                                                                
└─➤ echo "$YSU_VERSION" 
1.5.2 

I've updated it and I'm still getting the issue.

MichaelAquilina commented 4 years ago

That's strange - I can't reproduce the issue myself. I'll dig into your zshrc and see if there's anything specific in there that might be causing this.

jcklpe commented 4 years ago

I think it might only be a problem for commands that I have multiple aliases for

┌─    /mnt/c/Users/aslan/home/Documents/configs/zsh                                                                      master    
└─➤ .. 
Found existing alias for "cd ..". You should use: "cd.." 
android-debug-bridge  bash     conky    git  hyper-js          js-beautify  npm     README.md  ueli         vscode   wordpress  zsh 
auto-hotkey           con-emu  firefox  hue  install-list.txt  LICENSE      ranger  tour-box   user-styles  windows  zBrush     

┌─    /mnt/c/Users/aslan/home/Documents/configs                                                                          master    
└─➤ cd..   
Found existing alias for "cd ..". You should use: ".." 
3Dpainting.pdf  configs      health-experiments.md  movie-list.txt  parents.jpg  travel-list.txt 
Adobe           Desktop.ini  journal                paperwork       themes       writing
MichaelAquilina commented 4 years ago

ah yep I just found that regression this morning. I have a failing test case in #89. If I cant get that out by tonight I'll provide a hotfix.

A new feature has ended up introducing these regressions and tests did not catch them unfortunately.

jcklpe commented 4 years ago

Cool, thanks!

MichaelAquilina commented 4 years ago

@jcklpe please check out the latest release.

I've reverted the feature that introduced this bug. I'll look into introducing it again correctly at another time.

jcklpe commented 4 years ago

Yup works like previous now. Thanks for making this, it's a super great utility :)