about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Completion/Core/_closequotes11
1 files changed, 11 insertions, 0 deletions
diff --git a/Completion/Core/_closequotes b/Completion/Core/_closequotes
new file mode 100644
index 000000000..2c4b390e5
--- /dev/null
+++ b/Completion/Core/_closequotes
@@ -0,0 +1,11 @@
+#autoload
+
+# If the current completion is in quotes, add the closing quote.
+# This can clash with some of the more sophisticated forms of completion
+
+if [[ -n $compstate[quote] && $RBUFFER != *${compstate[quote]}* ]]; then
+  compstate[restore]=''
+  ISUFFIX="$ISUFFIX$compstate[quote]"
+fi
+
+return 1