about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDoug Kearns <dkearns@users.sourceforge.net>2005-06-24 13:19:27 +0000
committerDoug Kearns <dkearns@users.sourceforge.net>2005-06-24 13:19:27 +0000
commit4d8f3c396477a37c863cc80b954c4bc6d190683b (patch)
tree8aed7b0b72951f6f0bd1b2e3ba2753fc1fa903ba
parent4a923de007235196b95229e0d587b80da7b491c8 (diff)
downloadzsh-4d8f3c396477a37c863cc80b954c4bc6d190683b.tar.gz
zsh-4d8f3c396477a37c863cc80b954c4bc6d190683b.tar.xz
zsh-4d8f3c396477a37c863cc80b954c4bc6d190683b.zip
unposted: stop _apt-move from returning early and allow prefix-needed style to work
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Debian/Command/_apt-move16
2 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index e607856f3..93d67377b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2005-06-24  Doug Kearns  <djkea2@gus.gscit.monash.edu.au>
 
+	* unposted: Completion/Debian/Command/_apt-move: prevent function from
+	returning early and preventing prefix-needed style from working when
+	set to false
+
 	* 21379: Completion/Unix/Command/_wget: improve --restrict-file-names
 	completion by allowing 'nocontrol' as an argument
 
diff --git a/Completion/Debian/Command/_apt-move b/Completion/Debian/Command/_apt-move
index 8194c921d..c7ca59099 100644
--- a/Completion/Debian/Command/_apt-move
+++ b/Completion/Debian/Command/_apt-move
@@ -1,18 +1,20 @@
 #compdef apt-move
 
-local state line
+local curcontext="$curcontext" state line ret=1
+typeset -A opt_args
 
-_arguments \
+_arguments -C \
   '-c[specify an alternative configuration file]' \
   '-d[override the DIST setting]' \
   '-f[override the MAXDELETE setting]' \
   '-q[be quiet; suppress normal output]' \
   '-t[show what apt-move would do, but do not actually do anything]' \
   '1: :->cmds' \
-  '*: :->args' && return 0
+  '*: :->args' && ret=0
 
 case $state in
   cmds)
+    local -a cmds
     cmds=('get:update your master files from local apt' \
           'getlocal:alias of get' \
           'fsck:fix broken repositories' \
@@ -30,20 +32,20 @@ case $state in
           'listsrc:same as listbin, but lists source packages' \
           'mirrorbin:same as mirror, but gets the packages specified on stdin' \
           'mirrorsrc:same as mirrorbin, but gets source packages')
-      _describe -t commands 'apt-move command' cmds && return 0
+      _describe -t commands 'apt-move command' cmds && ret=0
   ;;
   args)
     case $line[1] in
 	  get|getlocal)
 	    # A directory or nothing
-		_files -/
+		_files -/ && ret=0
 	  ;;
 	  movefile)
 	    # A .dsc or a .deb
-		_files -g "*.d(sc|eb)"
+		_files -g "*.d(sc|eb)" && ret=0
 	  ;;
 	esac
   ;;
 esac
 
-return 1
+return ret