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

`check_alias_usage` prints all history #125

Open Adrien-LUDWIG opened 1 year ago

Adrien-LUDWIG commented 1 year ago

Issue Details

check_alias_usage prints all history entries before printing alias occurrencies.

$ check_alias_usage                                                               
entry='which zsh'
entry='firefox &'
entry='ls'
...
entry='cd'
131: ls='ls --color=tty'
...
0: 1='cd -1'

It does not correspond to the behaviour I understand from the source:

https://github.com/MichaelAquilina/zsh-you-should-use/blob/1f9cb008076d4f2011d5f814dfbcfbece94a99e0/you-should-use.plugin.zsh#L55-L65

Which should be, if I am not mistaken:

1) Print advancement as a ratio 2) Clear advancement 3) Print ordered alias usage

Operating System (uname -a)

Linux xxx-inspiron157510 6.1.25-1-MANJARO #1 SMP PREEMPT_DYNAMIC Thu Apr 20 13:48:36 UTC 2023 x86_64 GNU/Linux

zsh version (zsh --version)

zsh 5.9 (x86_64-pc-linux-gnu)

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

1.7.3

How is zsh-you-should-use installed?

Steps to reproduce the issue

gist link to your zshrc

My zshrc and antigen configuration file are on my dotfiles repo.