about summary refs log tree commit diff
path: root/Completion/Base
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-14 10:13:28 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-14 10:13:28 +0000
commitb37b46e29445fa3309e64b577e7d989957eae807 (patch)
tree36af7f3ae84e5e341adc3b59fc1db6b6e3f70eff /Completion/Base
parenta854d7cd13c65f69a221df585277376670f3601a (diff)
downloadzsh-b37b46e29445fa3309e64b577e7d989957eae807.tar.gz
zsh-b37b46e29445fa3309e64b577e7d989957eae807.tar.xz
zsh-b37b46e29445fa3309e64b577e7d989957eae807.zip
zsh-workers/7824
Diffstat (limited to 'Completion/Base')
-rw-r--r--Completion/Base/_arguments13
1 files changed, 11 insertions, 2 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index 1e1787b19..a25e8ded1 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -628,8 +628,11 @@ if [[ -z "$def" || "$def" = :* ]]; then
       [[ -n "$inrest" ]] && opt=''
     fi
     if [[ -z "$def" ]]; then
-      _message 'no more arguments'
-      noargs=yes
+      if [[ -z "$args$rest" ]]; then
+        noargs='no arguments'
+      else
+        noargs='no more arguments'
+      fi
     fi
   fi
 
@@ -651,6 +654,7 @@ if [[ -z "$def" || "$def" = :* ]]; then
 	for i in ${(s::)prefix[2,-1]%%${tmp[1][2]}*} ${tmp[1][2]}; do
 	  _options[${prefix[1]}$i]=''
 	done
+	noargs=''
 	break
       elif compset -P "$tmp[1]"; then
 
@@ -659,6 +663,7 @@ if [[ -z "$def" || "$def" = :* ]]; then
 
 	def="$dopts[$tmp[1]]"
 	opt=''
+	noargs=''
 	break
       fi
       shift 1 tmp
@@ -675,10 +680,12 @@ if [[ -z "$def" || "$def" = :* ]]; then
 	for i in ${(s::)prefix[2,-1]%%${tmp[1][2]}*} ${tmp[1][2]}; do
 	  _options[${prefix[1]}$i]=''
 	done
+	noargs=''
 	break
       elif compset -P "$tmp[1]"; then
 	def="$odopts[$tmp[1]]"
 	opt=''
+	noargs=''
 	break
       fi
       shift 1 tmp
@@ -914,6 +921,8 @@ while true; do
   break
 done
 
+[[ -n "$noargs" ]] && _message "$noargs"
+
 [[ -n "$aret" ]] && return 300
 
 # Set the return value.