Closed jeffreytse closed 3 years ago
Issue: jeffreytse/zsh-vi-mode#97
Thanks @jeffreytse I can merge this right away, just want to understand what’s happening:
How is it possible that egrep
sees piped data from functions
as binary? Does the zsh-vi-mode
overload functions
? None of the functions declared in the plug-in seem have non-ascii characters.
min addition to your silencing patch, maybe it’s a good idea to enforce egrep
to expect only non-binary content: egrep -a
?
Hi @djui I think the functions
will output all the functions, but in case the implementation of some functions would include some special characters, such as some control characters, it would cause the output looks like binary file for egrep
.
Hi @djui , zsh-vi-mode does nothing about the functions
or grep
, you could have a further test on the zsh-vi-mode plugin. I think we should redirect the error output of grep to /dev/null when we use subshell to capture the std output.
When the function has special characters, this plugin will show up this error information output by
grep
, this error was shown on every executed command, here is the key code line caused the error, it could be easily reproduced by using zsh-vi-mode at the same time.