mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2026-06-23 16:41:17 +02:00
Use builtin echo to avoid conflicts with user aliases
When users have an alias or function that shadows 'echo', it can break autosuggestions by either printing wrong suggestions or executing unwanted functions. This commit replaces all 'echo' calls with 'builtin echo' to ensure the shell's built-in echo is always used. Fixes: #843
This commit is contained in:
parent
85919cd1ff
commit
3be7de77ac
4 changed files with 8 additions and 8 deletions
|
|
@ -7,5 +7,5 @@ _zsh_autosuggest_escape_command() {
|
|||
setopt localoptions EXTENDED_GLOB
|
||||
|
||||
# Escape special chars in the string (requires EXTENDED_GLOB)
|
||||
echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}"
|
||||
builtin echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue