MichaelAquilina/zsh-you-should-use

`check_alias_usage` prints all history

Adrien-LUDWIG opened this issue · 0 comments

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:

# print current progress
let "current = current + 1"
printf "[$current/$total]\r"
done
# Clear all previous line output
printf "\r\033[K"
# Print ordered usage
for key in ${(k)usage}; do
echo "${usage[$key]}: $key='${aliases[$key]}'"
done | sort -rn -k1

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?

  • zplug
  • oh-my-zsh
  • Antigen
  • Other (please specify)

Steps to reproduce the issue

gist link to your zshrc

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