about summary refs log tree commit diff
path: root/Completion/Core/_main_complete
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core/_main_complete')
-rw-r--r--Completion/Core/_main_complete12
1 files changed, 7 insertions, 5 deletions
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index be96ce6f2..03fb15f31 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -45,11 +45,13 @@ fi
 
 # Special completion contexts after `~' and `='.
 
-if compset -P 1 '='; then
-  compstate[context]=equal
-elif [[ "$PREFIX" != */* && "$PREFIX[1]" = '~' ]]; then
-  compset -p 1
-  compstate[context]=tilde
+if [[ -z "$compstate[quote]" ]]; then
+  if compset -P 1 '='; then
+    compstate[context]=equal
+  elif [[ "$PREFIX" != */* && "$PREFIX[1]" = '~' ]]; then
+    compset -p 1
+    compstate[context]=tilde
+  fi
 fi
 
 # Initial setup.