mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
11 lines
401 B
Bash
11 lines
401 B
Bash
|
|
#--------------------------------------------------------------------#
|
|
# Utility Functions #
|
|
#--------------------------------------------------------------------#
|
|
|
|
_zsh_autosuggest_escape_command() {
|
|
setopt localoptions EXTENDED_GLOB
|
|
|
|
# Escape special chars in the string (requires EXTENDED_GLOB)
|
|
echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}"
|
|
}
|