about summary refs log tree commit diff
path: root/Completion/Core/_approximate
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core/_approximate')
-rw-r--r--Completion/Core/_approximate12
1 files changed, 6 insertions, 6 deletions
diff --git a/Completion/Core/_approximate b/Completion/Core/_approximate
index 1b40f7cbf..c63416901 100644
--- a/Completion/Core/_approximate
+++ b/Completion/Core/_approximate
@@ -1,9 +1,9 @@
 #autoload
 
 # This code will try to correct the string on the line based on the
-# strings generated for the context if `compconfig[correct]' is set.
-# These corrected strings will be shown in a list and one can
-# cycle through them as in a menucompletion or get the corrected prefix.
+# strings generated for the context. These corrected strings will be
+# shown in a list and one can cycle through them as in a menucompletion
+# or get the corrected prefix.
 #
 # Supported configuration keys:
 #
@@ -64,7 +64,7 @@
 local _comp_correct _correct_prompt comax
 local cfgacc cfgorig cfgps cfgins
 
-# Only if all global matchers hav been tried.
+# Only if all global matchers have been tried.
 
 [[ compstate[matcher] -ne compstate[total_matchers] ]] && return 1
 
@@ -153,7 +153,7 @@ compgen() {
 _comp_correct=1
 compstate[matcher]=-1
 
-_correct_prompt="${cfgps//\%e/1}"
+_correct_prompt="${cfgps//\\%e/1}"
 
 # We also need to set `extendedglob' and make the completion
 # code behave as if globcomplete were set.
@@ -188,7 +188,7 @@ while [[ _comp_correct -le comax ]]; do
   [[ "${#:-$PREFIX$SUFFIX}" -le _comp_correct+1 ]] && break
   (( _comp_correct++ ))
 
-  _correct_prompt="${cfgps//\%e/$_comp_correct}"
+  _correct_prompt="${cfgps//\\%e/$_comp_correct}"
 done
 
 compstate[matcher]="$compstate[total_matchers]"