zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.3k stars 1.85k forks source link

Strange behavior when aliasing `echo` #779

Open rennsax opened 5 months ago

rennsax commented 5 months ago

Describe the bug

When aliasing echo, the suggestions become strange.

To Reproduce

Steps to reproduce the behavior:

% zsh -df
% source path/to/zsh-autosuggestions.zsh
% alias echo='echo 123'
% # type any string

Screenshots

bug

Additional context

I've tried it in a docker container and the problem remains.

krugergui commented 3 months ago

I like to use 'alias echo="echo -n"' and it completely breaks zsh-autosuggestion.

Edit: For my special use case I changed:

echo $sysparams[pid]

to

/usr/bin/echo $sysparams[pid]