Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[stevenk@xxxxxxxxxx: Bug#246306: zsh: completion file for apt-move]



----- Forwarded message from Steve Kowalik <stevenk@xxxxxxxxxx> -----

Date: Wed, 28 Apr 2004 20:48:48 +1000
From: Steve Kowalik <stevenk@xxxxxxxxxx>
To: Debian Bug Tracking System <submit@xxxxxxxxxxxxxxx>
Subject: Bug#246306: zsh: completion file for apt-move

Package: zsh
Version: 4.2.0-5
Severity: wishlist

Hi,

	I have written a completion function for apt-move.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.5-1-k7-smp
Locale: LANG=C, LC_CTYPE=C

Versions of packages zsh depends on:
ii  debconf                     1.4.24       Debian configuration management sy
ii  libc6                       2.3.2.ds1-12 GNU C Library: Shared libraries an
ii  libcap1                     1:1.10-14    support for getting/setting POSIX.
ii  libncurses5                 5.4-3        Shared libraries for terminal hand
ii  passwd                      1:4.0.3-26   Change and administer password and

-- debconf information:
  zsh/rcmove: 

-- 
					Steve
"Why does everyone say 'Relax' when they're about to do something terrible?"
         - Ensign Harry Kim, USS Voyager


#compdef apt-move

local state line

_arguments \
  '-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

case $state in
  cmds)
    cmds=('get:update your master files from local apt' \
          'getlocal:alias of get' \
          'fsck:fix broken repositories' \
          'move:move cache files into mirror tree' \
          'movefile:move files into the repository' \
          'delete:delete obsolete packages' \
          'packages:create new local Packages files' \
          'update:alias for: get move delete packages' \
          'local:alias for: move delete packages' \
          'localupdate:alias for: getlocal move delete packages' \
          'mirror:update your local mirror from remote rsync site' \
          'sync:same as mirror, but only gets packages that you currently have installed on your system' \
          'exclude:prints a list of all packages EXCLUDED from the mirror by the .exclude file' \
          'listbin:prints lists of packages which can serve as the input to mirrorbin(mirror,sync,repo)' \
          '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
  ;;
  args)
    case $line[1] in
	  get|getlocal)
	    # A directory or nothing
		_files -/
	  ;;
	  movefile)
	    # A .dsc or a .deb
		_files -g "*.d{sc,eb}"
	  ;;
	esac
  ;;
esac

return 1


----- End forwarded message -----



Messages sorted by: Reverse Date, Date, Thread, Author