Revert "Simplify escaping of pattern and fix match_prev_cmd strategy"

This reverts commit 7f8ff2867c.
This commit is contained in:
Eric Freese
2017-12-06 07:51:06 -07:00
parent be8bba6f38
commit a1babef972
5 changed files with 55 additions and 10 deletions

11
src/util.zsh Normal file
View File

@@ -0,0 +1,11 @@
#--------------------------------------------------------------------#
# Utility Functions #
#--------------------------------------------------------------------#
_zsh_autosuggest_escape_command() {
setopt localoptions EXTENDED_GLOB
# Escape special chars in the string (requires EXTENDED_GLOB)
echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}"
}