configs/home/.zsh-distrobox/plugins/zsh-autosuggestions/src/util.zsh

12 lines
401 B
Bash
Raw Normal View History

2023-06-16 22:58:47 +02:00
#--------------------------------------------------------------------#
# Utility Functions #
#--------------------------------------------------------------------#
_zsh_autosuggest_escape_command() {
setopt localoptions EXTENDED_GLOB
# Escape special chars in the string (requires EXTENDED_GLOB)
echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}"
}