1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 13:33:52 +01:00

* 19845: Completion/Debian/Command/_apt-move: apt-move

completion function from Steven Kowalik.
This commit is contained in:
Clint Adams 2004-04-28 14:07:56 +00:00
parent 28bd1b02cf
commit 039b15b516
4 changed files with 66 additions and 13 deletions

@ -1,3 +1,8 @@
2004-04-28 Clint Adams <clint@zsh.org>
* 19845: Completion/Debian/Command/_apt-move: apt-move
completion function from Steven Kowalik.
2004-04-27 Peter Stephenson <pws@csr.com>
* 19839 (plus suggestion from 19842):

@ -1,9 +1,8 @@
DISTFILES_SRC='
.distfiles
_apt _aptitude _apt-show-versions
_bts _bug
_debchange _dpkg _dpkg_source _dput _dupload
_update-alternatives _make-kpkg _debfoster
_auto-apt _debsign
_update-rc.d
_apt _bts _dpkg _update-alternatives
_aptitude _bug _dpkg_source _update-rc.d
_apt-move _debchange _dput
_apt-show-versions _debfoster _dupload
_auto-apt _debsign _make-kpkg
'

@ -0,0 +1,49 @@
#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

@ -1,10 +1,10 @@
DISTFILES_SRC='
.distfiles
_alias _disable _jobs_builtin _read _ttyctl _which _zstyle
_autoload _echotc _kill _sched _typeset _zcompile _dirs
_bindkey _echoti _limit _set _ulimit _zed _zmv
_builtin _emulate _mere _setopt _unhash _zftp
_cd _enable _precommand _source _unsetopt _zle
_command _fc _print _stat _vared _zmodload
_compdef _hash _prompt _trap _wait _zpty
_alias _dirs _hash _prompt _trap _wait _zmv
_bindkey _disable _jobs_builtin _read _ttyctl _which _zpty
_builtin _echotc _kill _sched _typeset _zcompile _zstyle
_cd _echoti _limit _set _ulimit _zed
_command _emulate _mere _setopt _unhash _zftp
_compdef _enable _precommand _source _unsetopt _zle
_fc _print _stat _vared _zmodload
'