diff --git a/extra/dh_bash-completion b/extra/dh_bash-completion deleted file mode 100755 index 3cd6e5d5..00000000 --- a/extra/dh_bash-completion +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/perl -w - -=head1 NAME - -dh_bash-completion - install bash completions for package - -=cut - -use strict; -use File::Find; -use Debian::Debhelper::Dh_Lib; - -=head1 SYNOPSIS - -B [S>] - -=head1 DESCRIPTION - -dh_bash-completion is a debhelper program that is responsible for installing -completions for bash, usable installing the "bash-completion" package. - -If a file named debian/package.bash-completion exists, then different actions -are performed, depending on its format. - -It can be a proper completion snippet, and in that case it would be installed -in the completion directory, and no other actions would be performed. - -It can also be a list of files, with an optionally specified name to call the -completion snippet after. The file format is as follows: - - my/path/to/foo-completion # this would be installed as "foo-completion" - my/path/to/bar-completion baz # this would be installed as "baz" - -=cut - -init(); - -my $srcdir = '.'; -$srcdir = $dh{SOURCEDIR}."/" if defined $dh{SOURCEDIR}; - -foreach my $package (@{$dh{DOPACKAGES}}) { - next if is_udeb($package); - - my $tmp = tmpdir($package); - my $bc_dir = "$tmp/etc/bash_completion.d"; - my $completions = pkgfile($package,"bash-completion"); - - my @install; - my $name; - - if ($completions) { - if (! -d "$bc_dir") { - doit("install", "-d", "$bc_dir"); - } - - # try parsing a list of files - @install = filedoublearray($completions); - foreach my $set (@install) { - my @filelist; - my @tmp = @$set; - if (@$set > 1) { - $name = pop @$set; - } - else { - $name = basename($tmp[0]); - } - verbose_print "installing $tmp[0] as $name"; - - my @found; - foreach my $glob (@$set) { - @found = glob "$srcdir/$glob"; - if (!compat(6)) { - # Fall back to looking into debian/tmp - if (!@found || !-e $found[0]) { - @found = glob "debian/tmp/$glob"; - } - } - - if (!@found || !-e $found[0]) { - warning "file-list parsing failed, installing as proper snippet"; - - doit("install", "-p", "-m644", $completions, "$bc_dir/$package"); - exit 0 - } - push @filelist, @found; - } - - if (! compat(4)) { # check added in v5 - # glob now, relative to srcdir - if (!@filelist) { - error("$package missing files (@$set), aborting"); - } - } - - foreach my $src (@filelist) { - doit("install", "-p", "-m644", $src, "$bc_dir/$name"); - } - } - } -} - -=head1 SEE ALSO - -L - -This program is a part of bash-completion. - -L - -=head1 AUTHOR - -David Paleino - -=cut diff --git a/extra/dh_bash-completion.1 b/extra/dh_bash-completion.1 deleted file mode 100644 index a19d68c0..00000000 --- a/extra/dh_bash-completion.1 +++ /dev/null @@ -1,164 +0,0 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX -.. -.\} -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "DH_BASH-COMPLETION 1" -.TH DH_BASH-COMPLETION 1 "2009-01-29" "1.0" "Bash-Completion Debhelper" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -dh_bash\-completion \- install bash completions for package -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -\&\fBdh_bash\-completion\fR [\fIdebhelper\ options\fR] -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -dh_bash\-completion is a debhelper program that is responsible for installing -completions for bash, usable installing the \*(L"bash-completion\*(R" package. -.PP -If a file named debian/package.bash\-completion exists, then different actions -are performed, depending on its format. -.PP -It can be a proper completion snippet, and in that case it would be installed -in the completion directory, and no other actions would be performed. -.PP -It can also be a list of files, with an optionally specified name to call the -completion snippet after. The file format is as follows: -.PP -.Vb 2 -\& my/path/to/foo\-completion # this would be installed as "foo\-completion" -\& my/path/to/bar\-completion baz # this would be installed as "baz" -.Ve -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fIdebhelper\fR\|(1) -.PP -This program is a part of bash-completion. -.PP -\&\fIbash\fR\|(1) -.SH "AUTHOR" -.IX Header "AUTHOR" -David Paleino diff --git a/to_review/bluez-utils b/to_review/bluez-utils deleted file mode 100644 index 4b35ff4e..00000000 --- a/to_review/bluez-utils +++ /dev/null @@ -1,455 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for bluez-utils - -have hcitool && { -_bluetooth_adresses() -{ - if [ -n "${COMP_BLUETOOTH_SCAN:-}" ]; then - COMPREPLY=( ${COMPREPLY[@]:-} $( hcitool scan | \ - awk '/^\t/{print $1}' | grep "^$cur" ) ) - fi -} - -_bluetooth_devices() -{ - COMPREPLY=( ${COMPREPLY[@]:-} $( hcitool dev | \ - awk '/^\t/{print $1}' | grep "^$cur" ) ) -} - -_bluetooth_services() -{ - COMPREPLY=( $( compgen -W 'DID SP DUN LAN FAX OPUSH FTP HS HF HFAG \ - SAP NAP GN PANU HCRP HID CIP A2SRC A2SNK AVRCT AVRTG UDIUE \ - UDITE SYNCML' -- $cur ) ) -} - -_bluetooth_packet_types() -{ - COMPREPLY=( $( compgen -W 'DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3' -- \ - $cur ) ) -} - -_get_command() -{ - local i - - command= - for (( i=1; i < COMP_CWORD; i++ )); do - if [[ "${COMP_WORDS[i]}" != -* ]]; then - command=${COMP_WORDS[i]} - break - fi - done -} - -_hcitool() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -i) - _bluetooth_devices - return 0; - ;; - esac - - # --name=value style option - if [[ "$cur" == *=* ]]; then - prev=${cur/=*/} - cur=${cur/*=/} - case $prev in - --role) - COMPREPLY=( $( compgen -W 'm s' -- $cur ) ) - return 0; - ;; - --pkt-type) - _bluetooth_packet_types - return 0; - ;; - esac - fi - - - _get_command - if [ -z $command ]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-h -i' -- $cur ) ) - else - COMPREPLY=( $( compgen -W 'dev inq scan name info \ - spinq epinq cmd con cc dc sr cpt rssi lq tpl \ - afh lst auth enc key clkoff clock' -- $cur ) ) - fi - else - case $command in - @(name|info|dc|rssi|lq|afh|auth|key|clkoff|lst)) - _count_args - if [ $args -eq 2 ]; then - _bluetooth_adresses - fi - ;; - cc) - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--role= \ - --pkt-type=' -- $cur ) ) - else - _count_args - if [ $args -eq 2 ]; then - _bluetooth_adresses - fi - fi - ;; - sr) - _count_args - if [ $args -eq 2 ]; then - _bluetooth_adresses - else - COMPREPLY=( $( compgen -W \ - 'master slave' -- $cur ) ) - fi - ;; - cpt) - _count_args - if [ $args -eq 2 ]; then - _bluetooth_adresses - else - _bluetooth_packet_types - fi - ;; - @(tpl|enc|clock)) - _count_args - if [ $args -eq 2 ]; then - _bluetooth_adresses - else - COMPREPLY=( $( compgen -W \ - '0 1' -- $cur ) ) - fi - ;; - esac - fi -} -complete -F _hcitool hcitool - -_sdptool() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - --bdaddr) - _bluetooth_adresses - return 0; - ;; - esac - - _get_command - if [ -z $command ]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--help' -- $cur ) ) - else - COMPREPLY=( $( compgen -W 'search browse records add \ - del get setattr setseq' -- $cur ) ) - fi - else - case $command in - search) - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--bdaddr \ - --tree --raw --xml' -- $cur ) ) - else - _bluetooth_services - fi - ;; - @(browse|records)) - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--tree \ - --raw --xml' -- $cur ) ) - else - _bluetooth_adresses - fi - ;; - add) - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--handle= \ - --channel=' -- $cur ) ) - else - _bluetooth_services - fi - ;; - get) - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--bdaddr \ - --tree --raw --xml' -- $cur ) ) - fi - ;; - esac - fi -} -complete -F _sdptool sdptool - -_l2ping() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -i) - _bluetooth_devices - return 0; - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-i -s -c -t -f -r' -- $cur ) ) - else - _bluetooth_adresses - fi - -} -complete -F _l2ping l2ping - -_rfcomm() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -@(f|-config)) - _filedir - return 0; - ;; - -i) - _bluetooth_devices - _bluetooth_adresses - return 0; - ;; - esac - - _get_command - if [ -z $command ]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-h --help -a -r --raw -f \ - --config -i -A --auth -E --encrypt -S --secure \ - -M --master' -- $cur ) ) - else - COMPREPLY=( $( compgen -W 'show connect listen watch \ - bind release' -- $cur ) ) - fi - else - _count_args - if [ $args -eq 2 ]; then - _bluetooth_devices - else - case $command in - @(connect|bind)) - if [ $args -eq 3 ]; then - _bluetooth_adresses - fi - ;; - esac - fi - fi -} -complete -F _rfcomm rfcomm - -_ciptool() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -i) - _bluetooth_devices - _bluetooth_adresses - return 0; - ;; - esac - - _get_command - if [ -z $command ]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-h --help -i' -- $cur ) ) - else - COMPREPLY=( $( compgen -W 'show search connect release \ - loopback' -- $cur ) ) - fi - else - case $command in - @(connect|release|loopback)) - _count_args - if [ $args -eq 2 ]; then - _bluetooth_adresses - fi - ;; - esac - fi -} -complete -F _ciptool ciptool - -_dfutool() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -@(d|-device)) - _bluetooth_devices - return 0; - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-h --help -d --device' -- $cur ) ) - else - _count_args - case $args in - 1) - COMPREPLY=( $( compgen -W 'verify modify \ - upgrade archive' -- $cur ) ) - ;; - 2) - _filedir - ;; - esac - fi -} -complete -F _dfutool dfutool - -_hciconfig() -{ - local cur - - COMPREPLY=() - cur=`_get_cword` - - _get_command - if [ -z $command ]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-h --help -a --all' -- $cur ) ) - else - COMPREPLY=( $( compgen -W 'up down reset rstat auth \ - noauth encrypt noencrypt secmgr nosecmgr \ - piscan noscan iscan pscan ptype name class \ - voice iac inqmode inqdata inqtype inqparams \ - pageparms pageto afhmode aclmtu scomtu putkey \ - delkey commands features version revision lm' \ - -- $cur ) ) - fi - else - case $command in - @(putkey|delkey)) - _count_args - if [ $args -eq 2 ]; then - _bluetooth_adresses - fi - ;; - lm) - _count_args - if [ $args -eq 2 ]; then - COMPREPLY=( $( compgen -W 'MASTER \ - SLAVE NONE ACCEPT' -- $cur ) ) - fi - ;; - ptype) - _count_args - if [ $args -eq 2 ]; then - _bluetooth_packet_types - fi - ;; - esac - fi -} -complete -F _hciconfig hciconfig - -_hciattach() -{ - local cur - - COMPREPLY=() - cur=`_get_cword` - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-n -p -t -b -s -l' -- $cur ) ) - else - _count_args - case $args in - 1) - COMPREPLY=( $( command ls /dev/tty* ) ) - COMPREPLY=( $( compgen -W '${COMPREPLY[@]} \ - ${COMPREPLY[@]#/dev/}' -- $cur ) ) - ;; - 2) - COMPREPLY=( $( compgen -W 'any ericsson digi \ - xircom csr bboxes swave bcsp 0x0105 \ - 0x080a 0x0160 0x0002' -- $cur ) ) - ;; - 3) - COMPREPLY=( $( compgen -W '9600 19200 38400 \ - 57600 115200 230400 460800 921600' \ - -- $cur ) ) - ;; - 4) - COMPREPLY=( $( compgen -W 'flow noflow' \ - -- $cur ) ) - ;; - 5) - _bluetooth_adresses - ;; - esac - fi - -} -complete -F _hciattach hciattach - -_hid2hci() -{ - local cur - - COMPREPLY=() - cur=`_get_cword` - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-h --help -q --quiet -0 --tohci -1 \ - --tohid' -- $cur ) ) - fi -} -complete -F _hid2hci hid2hci - -_avctrl() -{ - local cur - - COMPREPLY=() - cur=`_get_cword` - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-h --help -q --quiet' -- $cur ) ) - else - _count_args - if [ $args -eq 1 ]; then - COMPREPLY=( $( compgen -W 'discover switch' -- $cur ) ) - fi - fi -} -complete -F _avctrl avctrl -} diff --git a/to_review/cfengine b/to_review/cfengine deleted file mode 100644 index d07844c1..00000000 --- a/to_review/cfengine +++ /dev/null @@ -1,89 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for cfengine - -have cfagent && { -_cfagent_options() -{ - COMPREPLY=( $( compgen -W '-a --sysadm -b --force-net-copy -c \ - --no-check-files -C --no-check-mounts -d --debug -D --define \ - -e --no-edits -E --enforce-links -f --file -h --help -H \ - --no-hard-classes -i --no-ifconfig -I --inform -k --no-copy \ - -K --no-lock -l --traverse-links -L --delete-stale-links -m \ - --no-mount -M --no-modules -n --recon --dry-run --just-print \ - -N --negate --undefine -p --parse-only -P --no-processes -q \ - --no-splay -s --no-commands -S --silent -t --no-tidy -u \ - --use-env -U --underscore-classes -v --verbose -V --version \ - -x --no-preconf -X --no-links -w --no-warn --quiet' -- $cur ) ) -} - -_cfagent() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -@(f|-file)) - _filedir - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - _cfagent_options - fi -} -complete -F _cfagent cfagent - -_cfrun() -{ - local i section cfinputs - - COMPREPLY=() - cur=`_get_cword` - - section=1 - for (( i=1; i < COMP_CWORD; i++ )); do - if [[ "${COMP_WORDS[i]}" == -- ]]; then - section=$((section + 1)) - fi - done - - case $section in - 1) - prev=${COMP_WORDS[COMP_CWORD-1]} - case $prev in - -f) - _filedir - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-f -h -d -S -T -v' \ - -- $cur ) ) - else - hostfile=${CFINPUTS:-/var/lib/cfengine/inputs}/cfrun.hosts - for (( i=1; i < COMP_CWORD; i++ )); do - if [[ "${COMP_WORDS[i]}" == -f ]]; then - hostfile=${COMP_WORDS[i+1]} - break - fi - done - [ ! -f $hostfile ] && return 0 - - COMPREPLY=( $(compgen -W "$( grep -v \ - -E '(=|^$|^#)' $hostfile )" -- $cur ) ) - fi - ;; - 2) - _cfagent_options - ;; - esac -} -complete -F _cfrun cfrun -} diff --git a/to_review/heimdal b/to_review/heimdal deleted file mode 100644 index f22a5866..00000000 --- a/to_review/heimdal +++ /dev/null @@ -1,158 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for heimdal - -have ktutil && { -_heimdal_principals() -{ - - COMPREPLY=( $( kadmin -l dump 2>/dev/null | awk '{print $1}' | \ - grep "^$cur" ) ) -} - -_heimdal_realms() -{ - - COMPREPLY=( $( kadmin -l dump 2>/dev/null | awk '{print $1}' | \ - awk -F @ '{print $2}' | grep "^$cur" ) ) -} - -_heimdal_encodings() -{ - - COMPREPLY=( $( compgen -W 'des-cbc-mcrc des-cbc-md4 des-cbc-md5 \ - des3-cbc-sha1 arcfour-hmac-md5 aes128-cts-hmac-sha1-96 \ - aes256-cts-hmac-sha1-96' -- $cur ) ) -} - - -_ktutil() -{ - local cur prev command options - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -p) - _heimdal_principals - return 0 - ;; - -e) - _heimdal_encodings - return 0 - ;; - -a) - _known_hosts - return 0 - ;; - -r) - _heimdal_realms - return 0 - ;; - -@(s|k)) - _filedir - return 0 - ;; - esac - - if [[ "$cur" == *=* ]]; then - prev=${cur/=*/} - cur=${cur/*=/} - case "$prev" in - --principal) - _heimdal_principals - return 0 - ;; - --enctype) - _heimdal_encodings - return 0 - ;; - --admin-server) - _known_hosts - return 0 - ;; - --realm) - _heimdal_realms - return 0 - ;; - --@(srv|key)tab) - _filedir - return 0 - ;; - esac - fi - - commands='add change copy get list remove rename purge srvconvert \ - srv2keytab srvcreate key2srvtab' - - for (( i=1; i < COMP_CWORD; i++ )); do - case ${COMP_WORDS[i]} in - -@(k|-keytab)) - i=$(($i+1)) - ;; - -*) - ;; - *) - command=${COMP_WORDS[i]} - break - ;; - esac - done - - if [[ "$cur" == -* ]]; then - case $command in - add) - options='-p --principal= -V -e --enctype= -w \ - --password= -r --random -s --no-salt \ - -h --hex' - ;; - change) - options='-r --realm= -a --admin-server -s \ - --server-port=' - ;; - get) - options='-p --principal= -e --enctype= -r \ - --realm= -a --admin-server= -s server \ - --server-port=' - ;; - list) - options='--keys --timestamp' - ;; - remove) - options='-p --principal= -V --kvno -e \ - --enctype=' - ;; - purge) - options='--age=' - ;; - @(srv2keytab|key2srvtab)) - options='-s --srvtab=' - ;; - *) - options='-k --keytab= -v --verbose --version \ - -v --help' - ;; - esac - COMPREPLY=( $( compgen -W "$options" -- $cur ) ) - else - case $command in - copy) - _filedir - ;; - get) - _heimdal_principals - ;; - rename) - _heimdal_principals - ;; - *) - COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) - ;; - esac - fi -} -complete -F _ktutil ktutil -} diff --git a/to_review/ldapvi b/to_review/ldapvi deleted file mode 100644 index 324f548e..00000000 --- a/to_review/ldapvi +++ /dev/null @@ -1,70 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for ldapvi - -have ldapvi && -_ldapvi() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(h|-host)) - _known_hosts - return 0 - ;; - -@(Y|-sasl-mech)) - COMPREPLY=( $( compgen -W 'EXTERNAL GSSAPI DIGEST-MD5 \ - CRAM-MD5 PLAIN ANONYMOUS' -- $cur ) ) - return 0 - ;; - --bind) - COMPREPLY=( $( compgen -W 'simple sasl' -- $cur ) ) - return 0 - ;; - --bind-dialog) - COMPREPLY=( $( compgen -W 'never auto always' \ - -- $cur ) ) - return 0 - ;; - --scope) - COMPREPLY=( $( compgen -W 'base one sub' -- $cur ) ) - return 0 - ;; - --deref) - COMPREPLY=( $( compgen -W 'never searching finding \ - always' -- $cur ) ) - return 0 - ;; - --encoding) - COMPREPLY=( $( compgen -W 'ASCII UTF-8 binary' \ - -- $cur ) ) - return 0 - ;; - --tls) - COMPREPLY=( $( compgen -W 'never allow try strict' \ - -- $cur ) ) - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--discover --out --in --delete \ - --rename -h --host -D --user -w --password --bind \ - --bind-dialog -I --sasl-interactive --bind-dialog -O \ - --sasl-secprops -Q --sasl-quiet -R --sasl-realm -U \ - --sasl-authcid -X --sasl-authzid -Y --sasl-mech -b \ - --base -s --scope -S --sort --add -o --class --config \ - -c --continue --deleteoldrdn -a --deref -d --discover \ - -A --empty --ncoding -H --help --ldap-conf -m --may -M \ - --managedsait --noquestions -! --noninteractive -q \ - --quiet -R --read -Z --starttls --tls -v --verbose \ - --ldapsearch --ldapmodify --ldapdelete --ldapmoddn' \ - -- $cur ) ) - fi -} && -complete -F _ldapvi ldapvi diff --git a/to_review/mkinitrd b/to_review/mkinitrd deleted file mode 100644 index 6eef1e4f..00000000 --- a/to_review/mkinitrd +++ /dev/null @@ -1,65 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for mkinitrd - -have mkinitrd && -_mkinitrd() -{ - local cur args - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - # --name value style option - case "$prev" in - --preload) - _modules - return 0 - ;; - esac - - # --name=value style option - if [[ "$cur" == *=* ]]; then - prev=${cur/=*/} - cur=${cur/*=/} - case "$prev" in - --@(with|builtin)) - _modules - return 0 - ;; - --@(fstab|dsdt)) - _filedir - return 0 - ;; - --net-dev) - _available_interfaces - return 0 - ;; - esac - fi - - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--version -v -f --preload \ - --force-scsi-probe --omit-scsi-modules \ - --omit-ide-modules --image-version --force-raid-probe \ - --omit-raid-modules --with= --force-lvm-probe \ - --omit-lvm-modules --builtin= --omit-dmraid --net-dev= \ - --fstab= --nocompress --dsdt= --bootchart' -- $cur ) ) - else - _count_args - - case $args in - 1) - _filedir - ;; - 2) - _kernel_versions - ;; - esac - fi - -} && -complete -F _mkinitrd mkinitrd diff --git a/to_review/msynctool b/to_review/msynctool deleted file mode 100644 index 281cafdc..00000000 --- a/to_review/msynctool +++ /dev/null @@ -1,50 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for msynctool - -have msynctool && -_msynctool() -{ - local cur prev anteprev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - if [ $COMP_CWORD -ge 2 ]; then - anteprev=${COMP_WORDS[COMP_CWORD-2]} - fi - - case $anteprev in - --configure) - COMPREPLY=( $( compgen -W "$(msynctool --showgroup \ - $prev | awk '/^Member/ {print $2}' | sed \ - -e 's/:$//' )" -- $cur ) ) - return 0 - ;; - --addmember) - COMPREPLY=( $( compgen -W '$(msynctool --listplugins \ - | sed -e '1d' )' -- $cur ) ) - return 0 - ;; - esac - - case $prev in - --@(configure|@(add|del|show)group|sync|addmember)) - COMPREPLY=( $( compgen -W '$(msynctool --listgroups \ - | sed -e '1d' )' -- $cur ) ) - return 0 - ;; - --@(showformats|filter-objtype|slow-sync)) - COMPREPLY=( $( compgen -W '$(msynctool --listobjects \ - | sed -e '1d' )' -- $cur ) ) - return 0 - ;; - esac - - COMPREPLY=( $( compgen -W '--listgroups --listplugins --listobjects \ - --showformats --showgroup --sync --filter-objtype --slow-sync \ - --wait --multi --addgroup --delgroup --addmember --configure \ - --manual --configdir --conflict' -- $cur ) ) -} && -complete -F _msynctool msynctool diff --git a/to_review/munin-node b/to_review/munin-node deleted file mode 100644 index f9a037c5..00000000 --- a/to_review/munin-node +++ /dev/null @@ -1,99 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for munin node - -have munin-run && -_munin-run() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - --@(config|sconffile)) - _filedir - return 0 - ;; - --@(service|sconf)dir) - _filedir -d - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--config --servicedir --sconfdir \ - --sconffile --help --debug --version' -- $cur ) ) - else - COMPREPLY=( $( command ls /etc/munin/plugins | grep "^$cur" ) ) - fi -} && -complete -F _munin-run munin-run - -have munin-update && -_munin-update() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - --config) - _filedir - return 0 - ;; - --host) - _known_hosts - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--force-root --[no]force-root \ - --service --host --config --help --debug --nodebug \ - --fork --nofork --stdout --nostdout --timeout' \ - -- $cur ) ) - fi -} && -complete -F _munin-update munin-update - -have munin-node-configure && -_munin-node-configure() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - --config) - _filedir - return 0 - ;; - --@(service|lib)dir) - _filedir -d - return 0 - ;; - --snmp) - _known_hosts - return 0 - ;; - --snmpversion) - COMPREPLY=( $( compgen -W '1 2c 3' -- $cur ) ) - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--help --version --debug --config \ - --servicedir --libdir --families --suggest --shell \ - --remove-also --snmp --snmpversion --snmpcommunity' \ - -- $cur ) ) - fi -} && -complete -F _munin-node-configure munin-node-configure diff --git a/to_review/openldap b/to_review/openldap deleted file mode 100644 index 820c4f8c..00000000 --- a/to_review/openldap +++ /dev/null @@ -1,272 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for openldap - -have ldapsearch && { -_ldap_uris() -{ - COMPREPLY=( $( compgen -W 'ldap:// ldaps://' -- $cur ) ) -} - -_ldap_protocols() -{ - COMPREPLY=( $( compgen -W '2 3' -- $cur ) ) -} - -_ldapsearch() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -h) - _known_hosts - return 0 - ;; - -H) - _ldap_uris - return 0 - ;; - -T) - _filedir -d - return 0 - ;; - -@(f|y)) - _filedir - return 0 - ;; - -s) - COMPREPLY=( $( compgen -W 'base one sub children' \ - -- $cur ) ) - return 0 - ;; - -a) - COMPREPLY=( $( compgen -W 'never always search find' \ - -- $cur ) ) - return 0 - ;; - -P) - _ldap_protocols - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-n -u -v -t -tt -T -F -A -C -L -LL \ - -LLL -M -MM -S -d -f -x -D -W -w -y -H -h -p -b -s -a \ - -P -e -E -l -z -O -I -Q -U -R -X -Y -Z -ZZ' -- $cur ) ) - fi -} -complete -F _ldapsearch ldapsearch - -_ldapaddmodify() -{ - local cur prev options - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -h) - _known_hosts - return 0 - ;; - -H) - _ldap_uris - return 0 - ;; - -@(S|f|y)) - _filedir - return 0 - ;; - -P) - _ldap_protocols - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - options='-c -S -n -v -M -MM -d -D -W -w -y -h -H -p -P -O -I \ - -Q -U -R -x -X -Y -Z -ZZ -f' - if [[ ${COMP_WORDS[0]} == ldapmodify ]]; then - options="$options -a" - fi - COMPREPLY=( $( compgen -W "$options" -- $cur ) ) - fi -} -complete -F _ldapaddmodify ldapadd ldapmodify - -_ldapdelete() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -h) - _known_hosts - return 0 - ;; - -H) - _ldap_uris - return 0 - ;; - -@(f|y)) - _filedir - return 0 - ;; - -P) - _ldap_protocols - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-n -v -c -M -MM -d -f -D -W -w -y \ - -H -h -P -p -O -U -R -r -x -I -Q -X -Y -Z -ZZ' \ - -- $cur ) ) - fi -} -complete -F _ldapdelete ldapdelete - -_ldapcompare() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -h) - _known_hosts - return 0 - ;; - -H) - _ldap_uris - return 0 - ;; - -y) - _filedir - return 0 - ;; - -P) - _ldap_protocols - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-n -v -z -M -MM -d -D -W -w -y \ - -H -h -P -p -O -I -Q -U -R -x -X -Y -Z -ZZ' \ - -- $cur ) ) - fi -} -complete -F _ldapcompare ldapcompare - -_ldapmodrdn() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -h) - _known_hosts - return 0 - ;; - -H) - _ldap_uris - return 0 - ;; - -@(f|y)) - _filedir - return 0 - ;; - -P) - _ldap_protocols - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-r -s -n -v -c -M -MM -d -D -W -w \ - -y -H -h -P -p -O -I -Q -U -R -x -X -Y -Z -ZZ -f' \ - -- $cur ) ) - fi -} -complete -F _ldapmodrdn ldapmodrdn - -_ldapwhoami() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -h) - _known_hosts - return 0 - ;; - -H) - _ldap_uris - return 0 - ;; - -@(f|y)) - _filedir - return 0 - ;; - -P) - _ldap_protocols - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-n -v -z -d -D -W -w -y -H -h -p -P \ - -O -I -Q -U -R -x -X -Y -Z -ZZ' -- $cur ) ) - fi -} -complete -F _ldapwhoami ldapwhoami - -_ldappasswd() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -h) - _known_hosts - return 0 - ;; - -H) - _ldap_uris - return 0 - ;; - -@(t|T|y)) - _filedir - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-A -a -t -d -D -H -h -n -p -S -s -T \ - -v -W -w -y -O -I -Q -U -R -x -X -Y -Z -ZZ' -- $cur ) ) - fi -} -complete -F _ldappasswd ldappasswd -} diff --git a/to_review/openssl b/to_review/openssl deleted file mode 100644 index e5d721db..00000000 --- a/to_review/openssl +++ /dev/null @@ -1,291 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for openssl - -have openssl && { -_openssl_sections() -{ - local config - - # start with default configuration - config=/etc/pki/tls/openssl.cnf - - # check if a specific configuration file is used - for (( i=2; i < COMP_CWORD; i++ )); do - if [[ "${COMP_WORDS[i]}" == -config ]]; then - config=${COMP_WORDS[i+1]} - break - fi - done - - [ ! -f $config ] && return 0 - - COMPREPLY=( $( awk '/\[.*\]/ {print $2} ' $config | grep "^$cur" ) ) -} - -_openssl() -{ - local cur prev commands command options formats - - COMPREPLY=() - cur=`_get_cword` - - commands='asn1parse ca ciphers crl crl2pkcs7 dgst dh dhparam dsa \ - dsaparam ec ecparam enc engine errstr gendh gendsa genrsa \ - nseq ocsp passwd pkcs12 pkcs7 pkcs8 prime rand req rsa \ - rsautl s_client s_server s_time sess_id smime speed spkac \ - verify version x509 md2 md4 md5 rmd160 sha sha1 aes-128-cbc \ - aes-128-ecb aes-192-cbc aes-192-ecb aes-256-cbc aes-256-ecb \ - base64 bf bf-cbc bf-cfb bf-ecb bf-ofb camellia-128-cbc \ - camellia-128-ecb camellia-192-cbc camellia-192-ecb \ - camellia-256-cbc camellia-256-ecb cast cast-cbc cast5-cbc \ - cast5-cfb cast5-ecb cast5-ofb des des-cbc des-cfb des-ecb \ - des-ede des-ede-cbc des-ede-cfb des-ede-ofb des-ede3 \ - des-ede3-cbc des-ede3-cfb des-ede3-ofb des-ofb des3 desx rc2 \ - rc2-40-cbc rc2-64-cbc rc2-cbc rc2-cfb rc2-ecb rc2-ofb rc4 \ - rc4-40' - - if [ $COMP_CWORD -eq 1 ]; then - COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) - else - command=${COMP_WORDS[1]} - prev=${COMP_WORDS[COMP_CWORD-1]} - case $prev in - -@(CA|CAfile|CAkey|CAserial|cert|certfile|config|content|dcert|dkey|dhparam|extfile|in|inkey|kfile|key|keyout|out|oid|prvrify|rand|recip|revoke|sess_in|sess_out|spkac|sign|signkey|signer|signature|ss_cert|untrusted|verify)) - _filedir - return 0 - ;; - -@(outdir|CApath)) - _filedir -d - return 0 - ;; - -@(name|crlexts|extensions)) - _openssl_sections - return 0 - ;; - -@(in|out|key|cert|CA|CAkey|dkey|dcert)form) - formats='DER PEM' - case $command in - x509) - formats="$formats NET" - ;; - smime) - formats="$formats SMIME" - ;; - esac - COMPREPLY=( $( compgen -W "$formats" -- $cur ) ) - return 0 - ;; - -connect) - _known_hosts - return 0 - ;; - -starttls) - COMPREPLY=( $( compgen -W 'smtp pop3 imap ftp' \ - -- $cur ) ) - return 0 - ;; - -cipher) - COMPREPLY=( $( compgen -W "$(openssl ciphers | \ - tr ':' '\n')" -- $cur ) ) - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - # possible options for the command - case $command in - asn1parse) - options='-inform -in -out -noout \ - -offset -length -i -oid \ - -strparse' - ;; - ca) - options='-verbose -config -name \ - -gencrl -revoke -crl_reason \ - -crl_hold -crl_compromise \ - -crl_CA_compromise -crldays \ - -crlhours -crlexts -startdate \ - -enddate -days -md -policy \ - -keyfile -key -passin -cert \ - -selfsig -in -out -notext \ - -outdir -infiles -spkac \ - -ss_cert -preserveDN \ - -noemailDN -batch -msie_hack \ - -extensions -extfile -engine \ - -subj -utf8 -multivalue-rdn' - ;; - ciphers) - options='-v -ssl2 -ssl3 -tls1' - ;; - crl) - options='-inform -outform -text -in \ - -out -noout -hash -issuer \ - -lastupdate -nextupdate \ - -CAfile -CApath' - ;; - crl2pkcs7) - options='-inform -outform -in -out \ - -print_certs' - ;; - dgst) - options='-md5 -md4 -md2 -sha1 -sha \ - -mdc2 -ripemd160 -dss1 -c -d \ - -hex -binary -out -sign \ - -verify -prverify -signature' - ;; - dsa) - options='-inform -outform -in -passin \ - -out -passout -des -des3 -idea \ - -text -noout -modulus -pubin \ - -pubout' - ;; - dsaparam) - options='-inform -outform -in -out \ - -noout -text -C -rand -genkey' - ;; - enc) - options='-ciphername -in -out -pass \ - -e -d -a -A -k -kfile -S -K \ - -iv -p -P -bufsize -debug' - ;; - dhparam) - options='-inform -outform -in -out \ - -dsaparam -noout -text -C -2 \ - -5 -rand' - ;; - gendsa) - options='-out -des -des3 -idea -rand' - ;; - genrsa) - options='-out -passout -des -des3 \ - -idea -f4 -3 -rand' - ;; - pkcs7) - options='-inform -outform -in -out \ - -print_certs -text -noout' - ;; - rand) - options='-out -rand -base64' - ;; - req) - options='-inform -outform -in -passin \ - -out -passout -text -noout \ - -verify -modulus -new -rand \ - -newkey -newkey -nodes -key \ - -keyform -keyout -md5 -sha1 \ - -md2 -mdc2 -config -x509 \ - -days -asn1-kludge -newhdr \ - -extensions -reqexts section' - ;; - rsa) - options='-inform -outform -in -passin \ - -out -passout -sgckey -des \ - -des3 -idea -text -noout \ - -modulus -check -pubin -pubout \ - -engine' - ;; - rsautl) - options='-in -out -inkey -pubin \ - -certin -sign -verify -encrypt \ - -decrypt -pkcs -ssl -raw \ - -hexdump -asn1parse' - ;; - s_client) - options='-connect -verify -cert \ - -certform -key -keyform -pass \ - -CApath -CAfile -reconnect \ - -pause -showcerts -debug -msg \ - -nbio_test -state -nbio -crlf \ - -ign_eof -quiet -ssl2 -ssl3 \ - -tls1 -no_ssl2 -no_ssl3 \ - -no_tls1 -bugs -cipher \ - -starttls -engine -tlsextdebug \ - -no_ticket -sess_out -sess_in \ - -rand' - ;; - s_server) - options='-accept -context -verify \ - -Verify -crl_check \ - -crl_check_all -cert -certform \ - -key -keyform -pass -dcert \ - -dcertform -dkey -dkeyform \ - -dpass -dhparam -nbio - -nbio_test -crlf -debug -msg \ - -state -CApath -CAfile -nocert \ - -cipher -quiet -no_tmp_rsa \ - -ssl2 -ssl3 -tls1 -no_ssl2 \ - -no_ssl3 -no_tls1 -no_dhe \ - -bugs -hack -www -WWW -HTTP \ - -engine -tlsextdebug \ - -no_ticket -id_prefix -rand' - ;; - s_time) - options='-connect -www -cert -key \ - -CApath -CAfile -reuse -new \ - -verify -nbio -time -ssl2 \ - -ssl3 -bugs -cipher' - ;; - sess_id) - options='-inform -outform -in -out \ - -text -noout -context ID' - ;; - smime) - options='-encrypt -decrypt -sign \ - -verify -pk7out -des -des3 \ - -rc2-40 -rc2-64 -rc2-128 \ - -aes128 -aes192 -aes256 -in \ - -certfile -signer -recip \ - -inform -passin -inkey -out \ - -outform -content -to -from \ - -subject -text -rand' - ;; - speed) - options='-engine' - ;; - verify) - options='-CApath -CAfile -purpose \ - -untrusted -help \ - -issuer_checks -verbose \ - -certificates' - ;; - x509) - options='-inform -outform -keyform \ - -CAform -CAkeyform -in -out \ - -serial -hash -subject-hash \ - -issuer_hash -subject -issuer \ - -nameopt -email -startdate \ - -enddate -purpose -dates \ - -modulus -fingerprint -alias \ - -noout -trustout -clrtrust \ - -clrreject -addtrust \ - -addreject -setalias -days \ - -set_serial -signkey \ - -x509toreq -req -CA -CAkey \ - -CAcreateserial -CAserial \ - -text -C -md2 -md5 -sha1 -mdc2 \ - -clrext -extfile -extensions \ - -engine' - ;; - @(md5|md4|md2|sha1|sha|mdc2|ripemd160)) - options='-c -d' - ;; - esac - COMPREPLY=( $( compgen -W "$options" -- $cur ) ) - else - if [[ "$command" == speed ]]; then - COMPREPLY=( $( compgen -W 'md2 mdc2 md5 hmac \ - sha1 rmd160 idea-cbc rc2-cbc rc5-cbc \ - bf-cbc des-cbc des-ede3 rc4 rsa512 \ - rsa1024 rsa2048 rsa4096 dsa512 dsa1024 \ - dsa2048 idea rc2 des rsa blowfish' -- \ - $cur ) ) - else - _filedir - fi - fi - fi -} -complete -F _openssl $default openssl -} diff --git a/to_review/repomanage b/to_review/repomanage deleted file mode 100644 index d932496b..00000000 --- a/to_review/repomanage +++ /dev/null @@ -1,24 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for repomanage - -have repomanage && -_repomanage() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - [[ "$prev" == -@(h|-help|k|-keep) ]] && return 0 - - if [[ "$cur" == -* ]] ; then - COMPREPLY=( $( compgen -W '-o --old -n --new -s --space -k \ - --keep -c --nocheck -h --help' -- $cur ) ) - else - _filedir -d - fi -} && -complete -F _repomanage $filenames repomanage diff --git a/to_review/rpcdebug b/to_review/rpcdebug deleted file mode 100644 index 6c2dd539..00000000 --- a/to_review/rpcdebug +++ /dev/null @@ -1,53 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for rpcdebug - -have rpcdebug && { -_rpcdebug_flags() -{ - - local i module - - for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do - if [[ ${COMP_WORDS[i]} == -m ]]; then - module=${COMP_WORDS[i+1]} - fi - done - - if [ -n "$module" ]; then - COMPREPLY=( $( compgen -W "$(rpcdebug -vh 2>&1 \ - | grep '^'$module' '\ - | awk '{$1 = ""; print $0}')" -- $cur ) ) - fi -} - -_rpcdebug() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -s) - _rpcdebug_flags - return 0 - ;; - -c) - _rpcdebug_flags - return 0 - ;; - -m) - COMPREPLY=( $( compgen -W 'rpc nfs nfsd nlm' -- $cur ) ) - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-v -h -m -s -c' -- $cur ) ) - fi -} -complete -F _rpcdebug rpcdebug -} diff --git a/to_review/rpmcheck b/to_review/rpmcheck deleted file mode 100644 index c27592bc..00000000 --- a/to_review/rpmcheck +++ /dev/null @@ -1,30 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for rpmcheck - -have rpmcheck && -_rpmcheck() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -base) - _filedir - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-explain -failures -successes \ - -dump -dump-all -base -help -compressed-input' \ - -- $cur ) ) - else - _filedir - fi -} && -complete -F _rpmcheck rpmcheck $files diff --git a/to_review/samba b/to_review/samba deleted file mode 100644 index 27e9dcd9..00000000 --- a/to_review/samba +++ /dev/null @@ -1,304 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for samba - -have smbclient && { -_samba_resolve_order() -{ - COMPREPLY=( $( compgen -W 'lmhosts host wins bcast' -- $cur ) ) -} - -_samba_domains() -{ - if [ -n "${COMP_SAMBA_SCAN:-}" ]; then - COMPREPLY=( $( smbtree -D | grep "^$cur" ) ) - fi -} - -_samba_hosts() -{ - if [ -n "${COMP_SAMBA_SCAN:-}" ]; then - COMPREPLY=( $( smbtree -S | grep "^$cur" ) ) - fi -} - -_smbclient() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -R) - _samba_resolve_order - return 0; - ;; - -t) - COMPREPLY=( $( compgen -W 'SJIS EUC JIS7 JIS8 JUNET \ - HEX CAP' -- $cur ) ) - return 0; - ;; - -@(s|A)) - _filedir - return 0; - ;; - -l) - _filedir -d - return 0; - ;; - -O) - COMPREPLY=( $( compgen -W 'SO_KEEPALIVE SO_REUSEADDR \ - SO_BROADCAST TCP_NODELAY IPTOS_LOWDELAY \ - IPTOS_THROUGHPUT SO_SNDBUF SO_RCVBUF \ - SO_SNDLOWAT SO_RCVLOWAT' -- $cur ) ) - return 0; - ;; - -T) - COMPREPLY=( $( compgen -W 'c x I X F b g q r N a' -- \ - $cur ) ) - return 0; - ;; - -W) - _samba_domains - return 0; - ;; - esac - - # --name=value style option - if [[ "$cur" == *=* ]]; then - prev=${cur/=*/} - cur=${cur/*=/} - case $prev in - --logfile) - _filedir -d - return 0; - ;; - --authentication-file) - _filedir - return 0; - ;; - --workgroup) - _samba_domains - return 0; - ;; - esac - fi - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-b -d -L -U -I -M -m -A -N -i -O \ - -p -R -s -k -P -c -D -W -l -E --debuglevel= --logfile= \ - --workgroup=' -- $cur ) ) - fi -} -complete -F _smbclient smbclient - -_smbget() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -@(o|f|-outputfile|-rcfile)) - _filedir - return 0; - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-a --guest -r --resume -R \ - --recursive -u --username= -p --password= -w \ - --workgroup= -n --nonprompt -d --debuglevel= -D --dots \ - -P --keep-permissions -o --outputfile -f --rcfile -q \ - --quiet -v --verbose -b --blocksize -? --help --usage' \ - -- $cur ) ) - fi -} -complete -F _smbget smbget - -_smbcacls() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -s) - _filedir - return 0; - ;; - -l) - _filedir -d - return 0; - ;; - esac - - # --name=value style option - if [[ "$cur" == *=* ]]; then - prev=${cur/=*/} - cur=${cur/*=/} - case $prev in - --logfile) - _filedir -d - return 0; - ;; - esac - fi - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-a -M -D -S -U -C -G --numeric -t \ - -h --help -V -s -d --debuglevel= -l --logfile=' -- \ - $cur ) ) - fi -} -complete -F _smbcacls smbcacls - -_smbcquotas() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -@(s|A)) - _filedir - return 0; - ;; - -l) - _filedir -d - return 0; - ;; - esac - - # --name=value style option - if [[ "$cur" == *=* ]]; then - prev=${cur/=*/} - cur=${cur/*=/} - case $prev in - --logfile) - _filedir -d - return 0; - ;; - --authentication-file) - _filedir - return 0; - ;; - esac - fi - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-u -L -F -S -n -t -v -h --help -V \ - -s -d --debuglevel= -l --logfile= -N -k -A \ - --authentication-file= -U --user=' -- $cur ) ) - fi -} -complete -F _smbcquotas smbcquotas - -_smbpasswd() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -r) - _samba_hosts - return 0; - ;; - -R) - _samba_resolve_order - return 0; - ;; - -c) - _filedir - return 0; - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-a -c -x -d -e -D -n -r -R -m -U -h \ - -s -w -W -i -L' -- $cur ) ) - fi -} -complete -F _smbpasswd smbpasswd - -_smbtar() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -@(r|t)) - _filedir tar - return 0; - ;; - -s) - _samba_hosts - return 0; - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-r -i -a -v -s -p -x -X -N -b -d -l \ - -u -t' -- $cur ) ) - fi -} -complete -F _smbtar smbtar - -_smbtree() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -@(s|A)) - _filedir - return 0; - ;; - -l) - _filedir -d - return 0; - ;; - esac - - # --name=value style option - if [[ "$cur" == *=* ]]; then - prev=${cur/=*/} - cur=${cur/*=/} - case $prev in - --logfile) - _filedir -d - return 0; - ;; - --authentication-file) - _filedir - return 0; - ;; - esac - fi - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-b -D -S -V -s -d --debuglevel= -l \ - --logfile= -N -k -A --authentication-file= -U --user= \ - -h --help' -- $cur ) ) - fi -} -complete -F _smbtree smbtree -} diff --git a/to_review/smartctl b/to_review/smartctl deleted file mode 100644 index fc50d115..00000000 --- a/to_review/smartctl +++ /dev/null @@ -1,195 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for smartctl - -have smartctl && { -_smartctl_quietmode() -{ - COMPREPLY=( $( compgen -W 'errorsonly silent' -- $cur ) ) -} -_smartctl_device() -{ - COMPREPLY=( $( compgen -W 'ata scsi 3ware' -- $cur ) ) -} -_smartctl_tolerance() -{ - COMPREPLY=( $( compgen -W 'warn exit ignore' -- $cur ) ) -} -_smartctl_badsum() -{ - COMPREPLY=( $( compgen -W 'normal conservative permissive verypermissive' -- $cur ) ) -} -_smartctl_report() -{ - COMPREPLY=( $( compgen -W 'ioctl ataioctl scsiioctl' -- $cur ) ) -} -_smartctl_feature() -{ - COMPREPLY=( $( compgen -W 'on off' -- $cur ) ) -} -_smartctl_log() -{ - COMPREPLY=( $( compgen -W 'error selftest selective directory' -- $cur ) ) -} -_smartctl_vendorattribute() -{ - COMPREPLY=( $( compgen -W 'help 9,minutes 9,seconds 9,halfminutes \ - 9,temp 192,emergencyretractcyclect 193,loadunload \ - 194,10xCelsius 194,unknown 198,offlinescanuncsectorct \ - 200,writeerrorcount 201,detectedtacount 220,temp' -- $cur ) ) -} -_smartctl_firmwarebug() -{ - COMPREPLY=( $( compgen -W 'none samsung samsung2' -- $cur ) ) -} -_smartctl_presets() -{ - COMPREPLY=( $( compgen -W 'use ignore show showall' -- $cur ) ) -} -_smartctl_test() -{ - COMPREPLY=( $( compgen -W 'offline short long conveyance select afterselect,on afterselect,off pending' -- $cur ) ) -} - - -_smartctl() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - # --name value style option - case "$prev" in - -q) - _smartctl_quietmode - ;; - -d) - _smartctl_device - return 0 - ;; - -t) - _smartctl_tolerance - return 0 - ;; - -b) - _smartctl_badsum - return 0 - ;; - -r) - _smartctl_report - return 0 - ;; - -s) - _smartctl_feature - return 0 - ;; - -o) - _smartctl_feature - return 0 - ;; - -S) - _smartctl_feature - return 0 - ;; - -l) - _smartctl_log - return 0 - ;; - -v) - _smartctl_vendorattribute - return 0 - ;; - -F) - _smartctl_firmwarebug - return 0 - ;; - -P) - _smartctl_presets - return 0 - ;; - -t) - _smartctl_test - return 0 - ;; - esac - - # --name=value style option - if [[ "$cur" == *=* ]]; then - prev=${cur/=*/} - cur=${cur/*=/} - case "$prev" in - --quietmode) - _smartctl_quietmode - return 0 - ;; - --device) - _smartctl_device - return 0 - ;; - --tolerance) - _smartctl_tolerance - return 0 - ;; - --badsum) - _smartctl_badsum - return 0 - ;; - --report) - _smartctl_report - return 0 - ;; - --smart) - _smartctl_feature - return 0 - ;; - --offlineauto) - _smartctl_feature - return 0 - ;; - --saveauto) - _smartctl_feature - return 0 - ;; - --log) - _smartctl_log - return 0 - ;; - --vendorattribute) - _smartctl_vendorattribute - return 0 - ;; - --firmwarebug) - _smartctl_firmwarebug - return 0 - ;; - --presets) - _smartctl_presets - return 0 - ;; - --test) - _smartctl_test - return 0 - ;; - esac - fi - - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-h --help --usage -V --version \ - --copyright --license-i --info -a --all -q \ - --quietmode= -d --device= -T --tolerance= -b --badsum= \ - -r --report= -s --smart= -o --offlineauto= -S \ - --saveauto= -H --health -c --capabilities -A \ - --attributes -l --log= -v --vendorattribute= -F \ - --firmwarebug= -P --presets= -t --test= -C \ - --captive -X --abort' -- $cur ) ) - else - cur=${cur:=/dev/} - _filedir - fi -} -complete -F _smartctl smartctl -} diff --git a/to_review/strace b/to_review/strace deleted file mode 100644 index bf9878f4..00000000 --- a/to_review/strace +++ /dev/null @@ -1,99 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for strace - -have strace && -_strace() -{ - local cur prev offset i syscalls arch unistd - - # check if we're still completing strace - offset=0 - for (( i=1; i <= COMP_CWORD; i++ )); do - case ${COMP_WORDS[$i]} in - -@(o|e|p)) - i=$((i+1)) - continue - ;; - -*) - continue - ;; - esac - offset=$i - break - done - - if [ $offset -gt 0 ]; then - # FAIL: _command_offset is not defined anywhere. Guillame? - _command_offset $offset - else - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - -e) - if [[ "$cur" == *=* ]]; then - prev=${cur/=*/} - cur=${cur/*=/} - - # Import arch-specific syscalls -- not foolproof IMHO - #+ --David Paleino - arch=$(command uname -m) - syscalls=$(awk '/^#define __NR/ {print $2}' \ - /usr/include/asm/unistd.h | sed -e \ - 's/__NR_//') - if [ -z "$syscalls" ]; then - if [[ "$arch" =~ 86$ ]]; then - unistd=/usr/include/asm/unistd_32.h - else - unistd=/usr/include/asm/unistd_64.h - fi - syscalls=$(awk '/^#define __NR/ {print $2}' \ - $unistd | sed -e 's/__NR_//') - fi - - case $prev in - trace) - COMPREPLY=( $( compgen -W "$syscalls file process \ - network signal ipc desc all none" -- $cur) ) - return 0 - ;; - esac - else - COMPREPLY=( $( compgen -S"=" -W 'trace abbrev \ - verbose raw signal read write' \ - -- $cur ) ) - fi - return 0 - ;; - -o) - _filedir - return 0 - ;; - -p) - _pids - return 0 - ;; - -S) - COMPREPLY=( $( compgen -W 'time calls name nothing' -- $cur ) ) - return 0 - ;; - -u) - COMPREPLY=( $( compgen -u -- $cur ) ) - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-c -d -f -ff -F -h --help -i -q \ - -r -t -tt -ttt -T -v -V -x -xx -a -e -o -O -p \ - -s -S -u -E' -- $cur ) ) - else - COMPREPLY=( $( compgen -c -- $cur ) ) - fi - fi -} && -complete -F _strace $default strace diff --git a/to_review/vpnc b/to_review/vpnc deleted file mode 100644 index 9d056200..00000000 --- a/to_review/vpnc +++ /dev/null @@ -1,46 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for vpnc - -have vpnc && -_vpnc() -{ - local cur prev - - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} - - case $prev in - --pfs) - COMPREPLY=( $( compgen -W 'nopfs dh1 dh2 dh5 server' \ - -- $cur ) ) - return 0 - ;; - --pfs) - COMPREPLY=( $( compgen -W 'dh1 dh2 dh5' -- $cur ) ) - return 0 - ;; - --@(pid-file|script)) - _filedir - return 0 - ;; - --gateway) - _known_hosts - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--version --print-config --help \ - --long-help --gateway --id --username --udp --domain \ - --xauth-inter --script --dh --pfs --enable-1des \ - --application-version --ifname --debug --no-detach \ - --pid-file --local-port --udp-port --disable-natt \ - --non-inter' -- $cur ) ) - else - COMPREPLY=( $( command ls /etc/vpnc | grep "^$cur" ) ) - fi -} && -complete -F _vpnc vpnc diff --git a/to_review/xm b/to_review/xm deleted file mode 100644 index ebf67e91..00000000 --- a/to_review/xm +++ /dev/null @@ -1,216 +0,0 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# -# bash completion for xm - -have xm && { -_xen_domain_names() -{ - COMPREPLY=( $(compgen -W "$( xm list 2>/dev/null | awk '!/Name|Domain-0/ { print $1 }' )" -- $cur) ) -} - -_xen_domain_ids() -{ - COMPREPLY=( $(compgen -W "$( xm list 2>/dev/null | awk '!/Name|Domain-0/ { print $2 }' )" -- $cur) ) -} - -_xm() -{ - local cur prev command options - - COMPREPLY=() - cur=`_get_cword` - - commands='console create new delete destroy domid domname dump-core \ - list mem-max mem-set migrate pause reboot rename restore \ - resume save shutdown start suspend sysrq trigger top unpause \ - uptime vcpu-list vcpu-pin vcpu-set debug-keys dmesg info log \ - serve sched-credit sched-sedf block-attach block-detach \ - block-list network-attach network-detach network-list \ - vtpm-list vnet-list vnet-create vnet-delete labels addlabel \ - rmlabel getlabel dry-run resources makepolicy loadpolicy \ - cfgbootpolicy dumppolicy help' - - if [[ $COMP_CWORD -eq 1 ]] ; then - COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) - else - prev=${COMP_WORDS[COMP_CWORD-1]} - if [[ "$cur" == *=* ]]; then - prev=${cur/=*/} - cur=${cur/*=/} - fi - - command=${COMP_WORDS[1]} - if [[ "$cur" == -* ]]; then - # possible options for the command - case $command in - create) - options='-c' - ;; - dmesg) - options='--clear' - ;; - list) - options='--long' - ;; - reboot) - options='-w -a' - ;; - shutdown) - options='-w -a -R -H' - ;; - sched-credit) - options='-d -w -c' - ;; - @(block|network|vtpm|vnet)-list) - options='-l --long' - ;; - getpolicy) - options='--dumpxml' - ;; - new) - options='-h --help --help_config -q \ - --quiet --path= -f= \ - --defconfig= -F= --config= \ - -b --dryrun -x --xmldryrun \ - -s --skipdtd -p --paused -c \ - --console_autoconnect' - ;; - esac - COMPREPLY=( $( compgen -W "$options" -- $cur ) ) - else - case $command in - @(console|destroy|domname|domid|list|mem-@(set|max)|pause|reboot|rename|shutdown|unpause|vcpu-@(list|pin|set)|block-list|network-list|vtpm-list)) - _count_args - case $args in - 2) - _xen_domain_names - ;; - esac - ;; - migrate) - _count_args - case $args in - 2) - _xen_domain_names - ;; - 3) - _known_hosts - ;; - esac - ;; - @(restore|dry-run|vnet-create)) - _filedir - ;; - save) - _count_args - case $args in - 2) - _xen_domain_names - ;; - 3) - _filedir - ;; - esac - ;; - sysrq) - _count_args - case $args in - 2) - _xen_domain_names - ;; - 3) - COMPREPLY=( $(compgen -W "r s e i u b" -- $cur) ) - ;; - esac - ;; - block-attach) - _count_args - case $args in - 2) - _xen_domain_names - ;; - 3) - COMPREPLY=( $(compgen -W "phy: file:" -- $cur) ) - ;; - 5) - COMPREPLY=( $(compgen -W "w r" -- $cur) ) - ;; - 6) - _xen_domain_names - ;; - esac - ;; - block-detach) - _count_args - case $args in - 2) - _xen_domain_names - ;; - 3) - COMPREPLY=( $(compgen -W "$( xm block-list $prev 2>/dev/null | awk '!/Vdev/ { print $1 }' )" -- $cur) ) - ;; - esac - ;; - network-attach) - _count_args - case $args in - 2) - _xen_domain_names - ;; - *) - COMPREPLY=( $(compgen -W "script= ip= mac= bridge= backend=" -- $cur) ) - ;; - esac - ;; - network-detach) - _count_args - case $args in - 2) - _xen_domain_names - ;; - 3) - COMPREPLY=( $(compgen -W "$( xm network-list $prev 2>/dev/null | awk '!/Idx/ { print $1 }' )" -- $cur) ) - ;; - esac - ;; - sched-credit) - case $prev in - -d) - _xen_domain_names - return 0 - ;; - esac - ;; - create) - _filedir - COMPREPLY=( ${COMPREPLY[@]:-} \ - $( command ls /etc/xen | grep "^$cur" ) ) - ;; - new) - case $prev in - -@(f|F|-defconfig|-config)) - _filedir - return 0 - ;; - --path) - _filedir -d - return 0 - ;; - esac - - _count_args - case $args in - 2) - _xen_domain_names - ;; - esac - ;; - esac - fi - fi - - return 0 -} -complete -F _xm xm -}