Files
dotfiles/.zprezto/modules/autosuggestions/external/src/util.zsh
2018-08-12 15:26:21 +03:00

12 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}"
}