summaryrefslogtreecommitdiff
path: root/dot-oh-my-zsh/custom/plugins/zsh-autosuggestions/src/util.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'dot-oh-my-zsh/custom/plugins/zsh-autosuggestions/src/util.zsh')
-rw-r--r--dot-oh-my-zsh/custom/plugins/zsh-autosuggestions/src/util.zsh11
1 files changed, 11 insertions, 0 deletions
diff --git a/dot-oh-my-zsh/custom/plugins/zsh-autosuggestions/src/util.zsh b/dot-oh-my-zsh/custom/plugins/zsh-autosuggestions/src/util.zsh
new file mode 100644
index 00000000..1f55d363
--- /dev/null
+++ b/dot-oh-my-zsh/custom/plugins/zsh-autosuggestions/src/util.zsh
@@ -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}"
+}