diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2000-04-04 19:34:26 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2000-04-04 19:34:26 +0000 |
commit | e2fad744a42b7e6d640def9afc03dc92641c911d (patch) | |
tree | 985fc75d8e10ca289999d69e813baae29fa55915 | |
parent | 8b277826ebf259810e185355771f84691412be7d (diff) | |
download | zsh-e2fad744a42b7e6d640def9afc03dc92641c911d.tar.gz zsh-e2fad744a42b7e6d640def9afc03dc92641c911d.tar.xz zsh-e2fad744a42b7e6d640def9afc03dc92641c911d.zip |
Patches 10440 (Chmouel), 10448, 10477 (Clint)
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | Completion/Debian/_dpkg | 60 | ||||
-rw-r--r-- | Completion/Linux/_rpm | 2 | ||||
-rw-r--r-- | Functions/Zftp/zfcd_match | 2 |
4 files changed, 68 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog index 20d407818..1f948aff2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-04-04 Peter Stephenson <pws@pwstephenson.fsnet.co.uk> + + * Clint: 10477: Functions/Zftp/zfcd_match: some awks don't like + index zero. + + * Clint: 10448: Completion/Debian/_dpkg: complete after -S. + + * Chmouel: 10440: Completion/Linux/_rpm: rpm tags should have % + in front. + 2000-04-03 Sven Wischnowsky <wischnow@informatik.hu-berlin.de> * 10471: Completion/User/_imagemagick: new completion function @@ -45,6 +55,10 @@ Completion/User/_urls, Completion/X/_xmodmap, Doc/Zsh/compsys.yo, Src/Zle/computil.c: Various completion fixes. +2000-04-03 Peter Stephenson <pws@pwstephenson.fsnet.co.uk> + + * Clint: 10424: Completion/Debian/_dpkg: reported -i=irs failure. + 2000-04-02 Peter Stephenson <pws@pwstephenson.fsnet.co.uk> * pws: Config/version.mk: 3.1.6-dev-21. diff --git a/Completion/Debian/_dpkg b/Completion/Debian/_dpkg index d2ba448b3..4e10844a2 100644 --- a/Completion/Debian/_dpkg +++ b/Completion/Debian/_dpkg @@ -1,42 +1,86 @@ -#compdef dpkg +#compdef dpkg dpkg-deb +_dpkg_deb_args=('(--build)-b[build archive]:directory:_files -/' \ + '(-b)--build:directory:_files -/' \ + '(--contents)-c[list contents]:Debian package:_files -g \*.deb' \ + '(-c)--contents:Debian package:_files -g \*.deb' \ + '(--info)-I[show info]:Debian package:_files -g \*.deb' \ + '(-I)--info:Debian package:_files -g \*.deb' \ + '(--field)-f[show fields]:Debian package:_files -g \*.deb' \ + '(-f)--field:Debian package:_files -g \*.deb' \ + '(--control)-e[extract control]:Debian package:_files -g \*.deb' \ + '(-e)--control:Debian package:_files -g \*.deb' \ + '(--extract)-x[extract files]:Debian package:_files -g \*.deb' \ + '(-x)--extract:Debian package:_files -g \*.deb' \ + '(--vextract)-X[extract and list files]:Debian package:_files -g \*.deb' \ + '(-X)--vextract[extract and list]:Debian package:_files -g \*.deb' \ + '--fsys-tarfile[output fs tarfile]:Debian package:_files -g \*.deb') + +_dpkg_common_args=('--help[show help]' \ + '--version[show version]' \ + '--licence[show licensing]') + +case "$words[1]" in +dpkg) _arguments -s '(--install)-i[install packages]:Debian package:_files -g \*.deb' \ + '(-i)--install:Debian package:_files -g \*.deb' \ '--unpack[unpack package]:Debian package:_files -g \*.deb' \ '(--record-avail)-A[record available]:package file:_files' \ + '(-A)--record-avail:package file:_files' \ '--configure:package:_deb_packages installed' \ '(--remove)-r[remove package]:package:_deb_packages installed' \ + '(-r)--remove:package:_deb_packages installed' \ '(--purge)-P[purge package]:package:_deb_packages installed' \ + '(-P)--purge:package:_deb_packages installed' \ '--get-selections[get selections]:pattern:' \ '--set-selections[set selections]' \ '--update-avail[update available]:package file:_files' \ '--merge-avail[merge available]:package file:_files' \ '--clear-avail[clear available]' \ - '--forget-old-avail[forget uninstalled unavailable]' \ - '(--status)-s[display package status]:packages:_deb_packages avail' \ + '--forget-old-unavail[forget uninstalled unavailable]' \ + '(--status)-s[display package status]:packages:_deb_packages installed' \ + '(-s)--status:packages:_deb_packages installed' \ '(--print-avail)-p[display available details]:packages:_deb_packages avail' \ + '(-p)--print-avail:packages:_deb_packages avail' \ '(--listfiles)-L[list owned files]:packages:_deb_packages installed' \ + '(-L)--listfiles:packages:_deb_packages installed' \ '(--list)-l[list packages]:packages:_deb_packages avail' \ - '(--search)-S[search for file owner]:pattern:' \ + '(-l)--list:packages:_deb_packages avail' \ + '(--search)-S[search for file owner]:pattern:_files' \ + '(-S)--search:pattern:_files' \ '(--audit)-C[check for broken pkgs]' \ + '(-C)--audit' \ '--abort-after[abort after errors]:number of errors:' \ '--print-architecture[print target architecture]' \ '--print-gnu-build-architecture[print GNU version of target architecture]' \ '--print-installation-architecture[print host architecture]' \ '--compare-versions[compare version numbers]:expression:' \ - '--help[show help]' \ - '--version[show version]' \ - '--licence[show licensing]' \ '--admindir=[data directory]:directory:_files -/' \ '--root=[alternative root]:root:_files -/' \ '--instdir=[change inst root but not data dir]:_files -/' \ '(--selected-only)-O[skip unselected packages]' \ + '(-O)--selected-only' \ '(--skip-same-version)-E[skip packages with same version as installed]' \ + '(-E)--skip-same-version' \ '(--refuse-downgrade)-G[skip packages with earlier version than installed]' \ + '(-G)--refuse-downgrade' \ '(--auto-deconfigure)-B[install can break other packages]' \ + '(-B)--auto-deconfigure' \ '--largemem[optimize for >4Mb RAM]' \ '--smallmem[optimize for <4Mb RAM]' \ '--no-act[show potential actions but do not follow through]' \ '-D+[debug options]:debug options:(h 1 2 3)' \ '--debug=[debug options]:debug options:(help 1 2 3)' \ '--ignore-depends=[ignore depends involving package]:package:_deb_packages avail' \ - --{force,refuse,no-force}'--[forcing options]:what:(auto-select downgrade configure-any hold bad-path not-root overwrite overwrite-diverted depends-version depends confnew confold confdef confmiss conflicts architecture overwrite-dir remove-reinstreq remove-essential)' + --{force,refuse,no-force}'--[forcing options]:what:(auto-select downgrade configure-any hold bad-path not-root overwrite overwrite-diverted depends-version depends confnew confold confdef confmiss conflicts architecture overwrite-dir remove-reinstreq remove-essential)' \ + "$_dpkg_deb_args[@]" \ + "$_dpkg_common_args[@]" +;; + +dpkg-deb) +_arguments "$_dpkg_deb_args[@]" \ + "$_dpkg_common_args[@]" + +;; + +esac diff --git a/Completion/Linux/_rpm b/Completion/Linux/_rpm index 9ef2d57d9..9a39773c4 100644 --- a/Completion/Linux/_rpm +++ b/Completion/Linux/_rpm @@ -202,7 +202,7 @@ while [[ -n "$state" ]]; do fi ;; tags) - if compset -P '*\{'; then + if compset -P '*%*\{'; then _wanted tags expl 'RPM tag' \ compadd -M 'm:{a-z}={A-Z}' -S '\}' - \ "${(@)${(@f)$(_call tags rpm --querytags)}#RPMTAG_}" && ret=0 diff --git a/Functions/Zftp/zfcd_match b/Functions/Zftp/zfcd_match index 02a19af21..b5902cdde 100644 --- a/Functions/Zftp/zfcd_match +++ b/Functions/Zftp/zfcd_match @@ -26,7 +26,7 @@ if [[ $ZFTP_SYSTEM = UNIX* ]]; then # to list, but not a glob. Don't ask me why. # I hate having to rely on awk here. zftp ls -LF $dir >$tmpf - reply=($(awk '/\/$/ { print substr($1, 0, length($1)-1) }' $tmpf)) + reply=($(awk '/\/$/ { print substr($1, 1, length($1)-1) }' $tmpf)) rm -f $tmpf [[ -n $dir && $dir != */ ]] && dir="$dir/" if [[ -n $WIDGET ]]; then |