summary refs log tree commit diff
path: root/Completion/Base/Completer/_prefix
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base/Completer/_prefix')
-rw-r--r--Completion/Base/Completer/_prefix6
1 files changed, 5 insertions, 1 deletions
diff --git a/Completion/Base/Completer/_prefix b/Completion/Base/Completer/_prefix
index 3ec153245..a198f4cfb 100644
--- a/Completion/Base/Completer/_prefix
+++ b/Completion/Base/Completer/_prefix
@@ -48,7 +48,11 @@ for tmp in "$comp[@]"; do
       [[ compstate[nmatches] -gt 1 ]] && return 0
       compadd -U -i "$IPREFIX" -I "$ISUFFIX" - "${compstate[unambiguous]%$suf}x"
       compstate[list]=
-      compstate[insert]=unambiguous
+      if [[ -n $compstate[unambiguous] ]]; then
+        compstate[insert]=unambiguous
+      else
+        compstate[insert]=0
+      fi
       return 0
     fi
     (( _matcher_num++ ))