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

Escape sequences and printf placeholders get expanded in "Found..." message #98

Closed nwwdles closed 4 years ago

nwwdles commented 4 years ago

Issue Details

Operating System (uname -a)

Linux soba 5.4.39-1-MANJARO #1 SMP PREEMPT Wed May 6 10:36:44 UTC 2020 x86_64 GNU/Linux

zsh version (zsh --version)

zsh 5.8 (x86_64-pc-linux-gnu)

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

1.7.0

How is zsh-you-should-use installed?

Steps to reproduce the issue

  1. Add alias.
alias pf="printf '%s\n'"
  1. Run printf '%s\n' 1 2 3.

  2. Get unexpected output.

    $ printf '%s\n' 1 2 3
    Found existing alias for "printf '
    '". You should use: "pf"
    1
    2
    3

Minimal reproducible example .zshrc

source "$HOME/.zinit/bin/zinit.zsh"
zinit wait lucid for MichaelAquilina/zsh-you-should-use
alias pf="printf '%s\n'"
MichaelAquilina commented 4 years ago

@cupnoodles14 this issue should be fixed in the latest release (1.7.1). Update using your plugin of choice and let me know if its fixed :)

If you see the issue still persists, feel free to re-open this issue!

nwwdles commented 4 years ago

Works great, thanks!