about summary refs log tree commit diff
path: root/Completion/Linux/_rpm
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Linux/_rpm')
-rw-r--r--Completion/Linux/_rpm4
1 files changed, 3 insertions, 1 deletions
diff --git a/Completion/Linux/_rpm b/Completion/Linux/_rpm
index e17fa9c5c..e047af6d6 100644
--- a/Completion/Linux/_rpm
+++ b/Completion/Linux/_rpm
@@ -41,7 +41,7 @@
 
 # Used by `_arguments', made local here.
 
-local curcontext="$curcontext" state lstate line
+local curcontext="$curcontext" state lstate line nm="$compstate[nmatches]"
 typeset -A opt_args
 
 state=''
@@ -246,6 +246,8 @@ while [[ -n "$state" ]]; do
     _files "$expl[@]" -/ && ret=0
     ;;
   esac
+
+  [[ ret -eq 0 || $nm -ne $compstate[nmatches] ]] && return 0
 done
 
 return ret