From 9e416ace74656be82557ab51c674781debfb6eff Mon Sep 17 00:00:00 2001 From: Paul Ackersviller Date: Sun, 25 Nov 2007 16:55:47 +0000 Subject: Merge new completions 2386[378] onto 4.2 branch. --- Completion/Debian/Command/_dpkg-buildpackage | 28 +++++++++++++++ Completion/Debian/Command/_svn-buildpackage | 51 ++++++++++++++++++++++++++++ Completion/Linux/Command/_lsusb | 31 +++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 Completion/Debian/Command/_dpkg-buildpackage create mode 100644 Completion/Debian/Command/_svn-buildpackage create mode 100644 Completion/Linux/Command/_lsusb (limited to 'Completion') diff --git a/Completion/Debian/Command/_dpkg-buildpackage b/Completion/Debian/Command/_dpkg-buildpackage new file mode 100644 index 000000000..d6f5c5f0a --- /dev/null +++ b/Completion/Debian/Command/_dpkg-buildpackage @@ -0,0 +1,28 @@ +#compdef dpkg-buildpackage + +_arguments \ + '-b[binary-only build, no source]' \ + '-B[binary-only build, no source or arch-indep binaries]' \ + '-S[source-only build, no binaries]' \ + '-s-:source generation:((i\:default a\:force\ inclusion\ of\ original\ source d\:force\ exclusion\ of\ original\ source))' \ + '-a-:architecture:(alpha amd64 arm hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 sparc)' \ + '-v-:version:' \ + '-C-:changes description:_files' \ + '-m-:maintainer address:_email_addresses' \ + '-e-:maintainer address:_email_addresses' \ + '(-d)-D[check build dependencies and conflicts]' \ + '(-D)-d[do not check build dependencies and conflicts]' \ + '-W[turn certain errors into warnings]' \ + '-E[negates previously-set -W]' \ + '-nc[do not clean source tree]' \ + '-tc[clean the source tree after build]' \ + '-r-:gain-root command: _command_names -e' \ + '-p-:sign command: _command_names -e' \ + '-k-:key ID:' \ + '-us[do not sign source package]' \ + '-uc[do not sign .changes file]' \ + '*-i-:ignore regexp:' \ + '*-I-:ignore filename:_files' \ + '--admindir=:dpkg database dir:_files -/' \ + '(-h --help)'{-h,--help}'[show usage message]' \ + '--version[show version]' diff --git a/Completion/Debian/Command/_svn-buildpackage b/Completion/Debian/Command/_svn-buildpackage new file mode 100644 index 000000000..0b4d50125 --- /dev/null +++ b/Completion/Debian/Command/_svn-buildpackage @@ -0,0 +1,51 @@ +#compdef svn-buildpackage + +_arguments \ + '--svn-builder=[use CMD as build command instead of dpkg-buildpackage]:build command: _command_names -e' \ + '--svn-ignore-new[do not stop on svn conflicts or new/changed files]' \ + '--svn-dont-clean[do not run debian/rules clean (default: clean first)]' \ + '--svn-no-links[do not use file links (default: use links where possible)]' \ + '--svn-dont-purge[do not wipe the build directory (default: purge after build)]' \ + '--svn-reuse[reuse an existing build directory, copy trunk over it]' \ + '--svn-export[just prepares the build directory and exits]' \ + '--svn-tag[final build: Export && build && tag && dch -i]' \ + '--svn-retag[replace an existing tag directory if found while tagging]' \ + '--svn-only-tag[tags the current trunk directory without building]' \ + '--svn-noautodch[do not add a new Debian changelog entry when done]' \ + '--svn-lintian[run lintian after the build]' \ + '--svn-linda[like --svn-lintian, run linda instead]' \ + '--svn-move[move package files to .. after successful build]' \ + '--svn-move-to=:target dir:_files -/' \ + '--svn-pkg:package name:_deb_packages avail' \ + '--svn-override[override config variables]:list:' \ + '--svn-prebuild:hook: _command_names -e' \ + '--svn-postbuild:hook: _command_names -e' \ + '--svn-pretag:hook: _command_names -e' \ + '--svn-posttag:hook: _command_names -e' \ + '--svn-verbose[more verbose program output]' \ + '--svn-noninteractive[turn off interactive mode]' \ + '-b[binary-only build, no source]' \ + '-B[binary-only build, no source or arch-indep binaries]' \ + '-S[source-only build, no binaries]' \ + '-s-:source generation:((i\:default a\:force\ inclusion\ of\ original\ source d\:force\ exclusion\ of\ original\ source))' \ + '-a-:architecture:(alpha amd64 arm hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 sparc)' \ + '-v-:version:' \ + '-C-:changes description:_files' \ + '-m-:maintainer address:_email_addresses' \ + '-e-:maintainer address:_email_addresses' \ + '(-d)-D[check build dependencies and conflicts]' \ + '(-D)-d[do not check build dependencies and conflicts]' \ + '-W[turn certain errors into warnings]' \ + '-E[negates previously-set -W]' \ + '-nc[do not clean source tree]' \ + '-tc[clean the source tree after build]' \ + '-r-:gain-root command: _command_names -e' \ + '-p-:sign command: _command_names -e' \ + '-k-:key ID:' \ + '-us[do not sign source package]' \ + '-uc[do not sign .changes file]' \ + '*-i-:ignore regexp:' \ + '*-I-:ignore filename:_files' \ + '--admindir=:dpkg database dir:_files -/' \ + '(-h --help)'{-h,--help}'[show usage message]' \ + '--version[show version]' diff --git a/Completion/Linux/Command/_lsusb b/Completion/Linux/Command/_lsusb new file mode 100644 index 000000000..37701acd5 --- /dev/null +++ b/Completion/Linux/Command/_lsusb @@ -0,0 +1,31 @@ +#compdef lsusb + +local context state line usbidsline vendorid pair +typeset -A opt_args + +_arguments \ + '(-v --verbose)'{-v,--verbose}'[be verbose]' \ + '-s:bus and/or devnum to show:' \ + '-d:vendor and product to show:->vendorproduct' \ + '-D:device to show:_files' \ + '-t[dump the physical USB device hierarchy as a tree]' \ + '(-V --version)'{-V,--version}'[print version info and exit]' && return 0 + + if [[ ${+_lsusb_vendors} -eq 0 ]]; then + typeset -A _lsusb_vendors _lsusb_devices + while IFS="" read usbidsline + do + case "$usbidsline" in + ((#b)([0-9a-f]##) ##(*)) + vendorid="$match[1]" + _lsusb_vendors[$vendorid]="$match[2]" + ;; + ( (#b)([0-9a-f]##) ##(*))) + pair="$vendorid:$match[1]" + _lsusb_devices[${pair}]="$match[2]" + ;; + esac + done < <(zcat /var/lib/usbutils/usb.ids) +fi + +compadd -k _lsusb_devices -- cgit 1.4.1