Quote unquoted $cur to prevent globbing.

Closes Alioth #311614

Globbing might occur if $cur contains one of these globbing characters: * ? [ ]

The bug becomes apparent:

On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):

    MS-DOS style path detected: ...
    Preferred POSIX equivalent is: ...
    CYGWIN environment variable option "nodosfilewarning" turns off this warning.
    Consult the user's guide for more details about POSIX paths:
      http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.

Steps to reproduce on Linux using `strace':

Environment:  Linux, bash-completion-1.0

1.  Start bash with bash-completion loaded and find out PID ($$):

    $ echo $$
    MYPID

2.  In a second bash shell, `strace' the above PID:

    $ strace -e trace=open -f -o strace.log -p MYPID

3.  Within the first bash shell, type:

    $ cur="?"; _kernel_versions

4.  In the second bash shell, type ^C to quick `strace'.

5.  Check `strace.log', here you can see bash accessing
    something it shouldn't:

    ...
    open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
    ...

6.  The above call to `open' disappears if $cur in _kernel_versions gets
    quoted, and you repeat the steps above:

    _kernel_versions()
    {
        COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
    }
This commit is contained in:
Freddy Vulto 2009-09-25 09:36:29 +02:00
parent f871fe4101
commit cfcf9fae8f
130 changed files with 779 additions and 807 deletions

View File

@ -475,17 +475,17 @@ _configured_interfaces()
# SuSE system # SuSE system
COMPREPLY=( $( command ls \ COMPREPLY=( $( command ls \
/etc/sysconfig/network/ifcfg-* | \ /etc/sysconfig/network/ifcfg-* | \
sed -ne 's|.*ifcfg-\('$cur'.*\)|\1|p' ) ) sed -ne 's|.*ifcfg-\('"$cur"'.*\)|\1|p' ) )
elif [ -f /etc/pld-release ]; then elif [ -f /etc/pld-release ]; then
# PLD Linux # PLD Linux
COMPREPLY=( $( command ls -B \ COMPREPLY=( $( command ls -B \
/etc/sysconfig/interfaces | \ /etc/sysconfig/interfaces | \
sed -ne 's|.*ifcfg-\('$cur'.*\)|\1|p' ) ) sed -ne 's|.*ifcfg-\('"$cur"'.*\)|\1|p' ) )
else else
# Assume Red Hat # Assume Red Hat
COMPREPLY=( $( command ls \ COMPREPLY=( $( command ls \
/etc/sysconfig/network-scripts/ifcfg-* | \ /etc/sysconfig/network-scripts/ifcfg-* | \
sed -ne 's|.*ifcfg-\('$cur'.*\)|\1|p' ) ) sed -ne 's|.*ifcfg-\('"$cur"'.*\)|\1|p' ) )
fi fi
} }
@ -493,7 +493,7 @@ _configured_interfaces()
# #
_kernel_versions() _kernel_versions()
{ {
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- $cur ) ) COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
} }
# This function completes on all available network interfaces # This function completes on all available network interfaces
@ -513,7 +513,7 @@ _available_interfaces()
fi fi
COMPREPLY=( $( eval $cmd 2>/dev/null | \ COMPREPLY=( $( eval $cmd 2>/dev/null | \
sed -ne 's|^\('$cur'[^[:space:][:punct:]]\{1,\}\).*$|\1|p') ) sed -ne 's|^\('"$cur"'[^[:space:][:punct:]]\{1,\}\).*$|\1|p') )
} }
# This function expands tildes in pathnames # This function expands tildes in pathnames
@ -531,7 +531,7 @@ _expand()
eval cur=$cur eval cur=$cur
elif [[ "$cur" == \~* ]]; then elif [[ "$cur" == \~* ]]; then
cur=${cur#\~} cur=${cur#\~}
COMPREPLY=( $( compgen -P '~' -u $cur ) ) COMPREPLY=( $( compgen -P '~' -u "$cur" ) )
[ ${#COMPREPLY[@]} -eq 1 ] && eval COMPREPLY[0]=${COMPREPLY[0]} [ ${#COMPREPLY[@]} -eq 1 ] && eval COMPREPLY[0]=${COMPREPLY[0]}
return ${#COMPREPLY[@]} return ${#COMPREPLY[@]}
fi fi
@ -542,11 +542,11 @@ _expand()
[ $UNAME = SunOS -o $UNAME = AIX ] && [ $UNAME = SunOS -o $UNAME = AIX ] &&
_pids() _pids()
{ {
COMPREPLY=( $( compgen -W '$( command ps -efo pid | sed 1d )' -- $cur )) COMPREPLY=( $( compgen -W '$( command ps -efo pid | sed 1d )' -- "$cur" ))
} || } ||
_pids() _pids()
{ {
COMPREPLY=( $( compgen -W '$( command ps axo pid= )' -- $cur ) ) COMPREPLY=( $( compgen -W '$( command ps axo pid= )' -- "$cur" ) )
} }
# This function completes on process group IDs. # This function completes on process group IDs.
@ -554,11 +554,11 @@ _pids()
[ $UNAME = SunOS -o $UNAME = AIX ] && [ $UNAME = SunOS -o $UNAME = AIX ] &&
_pgids() _pgids()
{ {
COMPREPLY=( $( compgen -W '$( command ps -efo pgid | sed 1d )' -- $cur )) COMPREPLY=( $( compgen -W '$( command ps -efo pgid | sed 1d )' -- "$cur" ))
} || } ||
_pgids() _pgids()
{ {
COMPREPLY=( $( compgen -W '$( command ps axo pgid= )' -- $cur )) COMPREPLY=( $( compgen -W '$( command ps axo pgid= )' -- "$cur" ))
} }
# This function completes on process names. # This function completes on process names.
@ -569,7 +569,7 @@ _pnames()
COMPREPLY=( $( compgen -W '$( command ps -efo comm | \ COMPREPLY=( $( compgen -W '$( command ps -efo comm | \
sed -e 1d -e "s:.*/::" -e "s/^-//" \ sed -e 1d -e "s:.*/::" -e "s/^-//" \
-e "s/^<defunct>$//")' \ -e "s/^<defunct>$//")' \
-- $cur ) ) -- "$cur" ) )
} || } ||
_pnames() _pnames()
{ {
@ -585,7 +585,7 @@ _pnames()
sed -e "s/ .*//; s:.*/::; s/:$//;" \ sed -e "s/ .*//; s:.*/::; s/:$//;" \
-e "s/^[[(-]//; s/[])]$//" \ -e "s/^[[(-]//; s/[])]$//" \
-e "s/^<defunct>$//")' \ -e "s/^<defunct>$//")' \
-- $cur ) ) -- "$cur" ) )
} }
# This function completes on user IDs # This function completes on user IDs
@ -593,12 +593,12 @@ _pnames()
_uids() _uids()
{ {
if type getent &>/dev/null; then if type getent &>/dev/null; then
COMPREPLY=( $( compgen -W '$( getent passwd | cut -d: -f3 )' -- $cur ) ) COMPREPLY=( $( compgen -W '$( getent passwd | cut -d: -f3 )' -- "$cur" ) )
elif type perl &>/dev/null; then elif type perl &>/dev/null; then
COMPREPLY=( $( compgen -W '$( perl -e '"'"'while (($uid) = (getpwent)[2]) { print $uid . "\n" }'"'"' )' -- $cur ) ) COMPREPLY=( $( compgen -W '$( perl -e '"'"'while (($uid) = (getpwent)[2]) { print $uid . "\n" }'"'"' )' -- "$cur" ) )
else else
# make do with /etc/passwd # make do with /etc/passwd
COMPREPLY=( $( compgen -W '$( cut -d: -f3 /etc/passwd )' -- $cur ) ) COMPREPLY=( $( compgen -W '$( cut -d: -f3 /etc/passwd )' -- "$cur" ) )
fi fi
} }
@ -608,12 +608,12 @@ _gids()
{ {
if type getent &>/dev/null; then if type getent &>/dev/null; then
COMPREPLY=( $( getent group | \ COMPREPLY=( $( getent group | \
awk -F: '{if ($3 ~ /^'$cur'/) print $3}' ) ) awk -F: '{if ($3 ~ /^'"$cur"'/) print $3}' ) )
elif type perl &>/dev/null; then elif type perl &>/dev/null; then
COMPREPLY=( $( compgen -W '$( perl -e '"'"'while (($gid) = (getgrent)[2]) { print $gid . "\n" }'"'"' )' -- $cur ) ) COMPREPLY=( $( compgen -W '$( perl -e '"'"'while (($gid) = (getgrent)[2]) { print $gid . "\n" }'"'"' )' -- "$cur" ) )
else else
# make do with /etc/group # make do with /etc/group
COMPREPLY=( $( awk 'BEGIN {FS=":"} {if ($3 ~ /^'$cur'/) print $3}'\ COMPREPLY=( $( awk 'BEGIN {FS=":"} {if ($3 ~ /^'"$cur"'/) print $3}'\
/etc/group ) ) /etc/group ) )
fi fi
} }
@ -631,7 +631,7 @@ _services()
COMPREPLY=( "${COMPREPLY[@]}" $( builtin echo $famdir/!(*.rpm@(orig|new|save)|*~)) ) COMPREPLY=( "${COMPREPLY[@]}" $( builtin echo $famdir/!(*.rpm@(orig|new|save)|*~)) )
fi fi
COMPREPLY=( $( compgen -W '${COMPREPLY[@]#@($sysvdir|$famdir)/}' -- $cur ) ) COMPREPLY=( $( compgen -W '${COMPREPLY[@]#@($sysvdir|$famdir)/}' -- "$cur" ) )
} }
# This function completes on modules # This function completes on modules
@ -641,7 +641,7 @@ _modules()
local modpath local modpath
modpath=/lib/modules/$1 modpath=/lib/modules/$1
COMPREPLY=( $( command ls -R $modpath | \ COMPREPLY=( $( command ls -R $modpath | \
sed -ne 's/^\('$cur'.*\)\.k\?o\(\|.gz\)$/\1/p') ) sed -ne 's/^\('"$cur"'.*\)\.k\?o\(\|.gz\)$/\1/p') )
} }
# This function completes on installed modules # This function completes on installed modules
@ -664,7 +664,7 @@ _usergroup()
elif [[ $cur = *:* ]] && [ -n "$bash205" ]; then elif [[ $cur = *:* ]] && [ -n "$bash205" ]; then
COMPREPLY=( $( compgen -g -- ${cur##*[.:]} ) ) COMPREPLY=( $( compgen -g -- ${cur##*[.:]} ) )
else else
COMPREPLY=( $( compgen -S : -u -- $cur ) ) COMPREPLY=( $( compgen -S : -u -- "$cur" ) )
fi fi
} }
@ -673,7 +673,7 @@ _usergroup()
_shells() _shells()
{ {
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W '$( grep "^[[:space:]]*/" \ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W '$( grep "^[[:space:]]*/" \
/etc/shells 2>/dev/null )' -- $cur ) ) /etc/shells 2>/dev/null )' -- "$cur" ) )
} }
# Get real command. # Get real command.
@ -711,7 +711,7 @@ _count_args()
_pci_ids() _pci_ids()
{ {
COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W \ COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W \
"$( PATH="$PATH:/sbin" lspci -n | awk '{print $3}')" -- $cur ) ) "$( PATH="$PATH:/sbin" lspci -n | awk '{print $3}')" -- "$cur" ) )
} }
# This function completes on USB IDs # This function completes on USB IDs
@ -719,7 +719,7 @@ _pci_ids()
_usb_ids() _usb_ids()
{ {
COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W \ COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W \
"$( PATH="$PATH:/sbin" lsusb | awk '{print $6}' )" -- $cur ) ) "$( PATH="$PATH:/sbin" lsusb | awk '{print $6}' )" -- "$cur" ) )
} }
# start of section containing completion functions for external programs # start of section containing completion functions for external programs
@ -757,7 +757,7 @@ _service()
else else
COMPREPLY=( $( compgen -W '`sed -ne "y/|/ /; \ COMPREPLY=( $( compgen -W '`sed -ne "y/|/ /; \
s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\1/p" \ s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\1/p" \
$sysvdir/${prev##*/} 2>/dev/null`' -- $cur ) ) $sysvdir/${prev##*/} 2>/dev/null`' -- "$cur" ) )
fi fi
return 0 return 0
@ -793,7 +793,7 @@ _chown()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \ COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \
--dereference --no-dereference --from --silent --quiet \ --dereference --no-dereference --from --silent --quiet \
--reference --recursive --verbose --help --version' -- $cur ) ) --reference --recursive --verbose --help --version' -- "$cur" ) )
else else
_count_args _count_args
@ -833,7 +833,7 @@ _chgrp()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \ COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \
--dereference --no-dereference --silent --quiet \ --dereference --no-dereference --silent --quiet \
--reference --recursive --verbose --help --version' -- $cur ) ) --reference --recursive --verbose --help --version' -- "$cur" ) )
return 0 return 0
fi fi
@ -841,7 +841,7 @@ _chgrp()
if [ $COMP_CWORD -eq 1 ] && [[ "$cur" != -* ]] || \ if [ $COMP_CWORD -eq 1 ] && [[ "$cur" != -* ]] || \
[[ "$prev" == -* ]] && [ -n "$bash205" ]; then [[ "$prev" == -* ]] && [ -n "$bash205" ]; then
local IFS=$'\n' local IFS=$'\n'
COMPREPLY=( $( compgen -g $cur 2>/dev/null ) ) COMPREPLY=( $( compgen -g "$cur" 2>/dev/null ) )
else else
_filedir || return 0 _filedir || return 0
fi fi
@ -860,7 +860,7 @@ _umount()
COMPREPLY=() COMPREPLY=()
cur=`_get_cword` cur=`_get_cword`
COMPREPLY=( $( compgen -W '$( mount | cut -d" " -f 3 )' -- $cur ) ) COMPREPLY=( $( compgen -W '$( mount | cut -d" " -f 3 )' -- "$cur" ) )
return 0 return 0
} }
@ -896,18 +896,18 @@ _mount()
fi fi
elif [ -r /etc/vfstab ]; then elif [ -r /etc/vfstab ]; then
# Solaris # Solaris
COMPREPLY=( $( compgen -W "$( awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' /etc/vfstab )" -- $cur ) ) COMPREPLY=( $( compgen -W "$( awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' /etc/vfstab )" -- "$cur" ) )
elif [ ! -e /etc/fstab ]; then elif [ ! -e /etc/fstab ]; then
# probably Cygwin # probably Cygwin
COMPREPLY=( $( compgen -W "$( mount | awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' )" -- $cur ) ) COMPREPLY=( $( compgen -W "$( mount | awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' )" -- "$cur" ) )
else else
# probably Linux # probably Linux
if [ $prev = -L ]; then if [ $prev = -L ]; then
COMPREPLY=( $( compgen -W '$(sed -ne "s/^[[:space:]]*LABEL=\([^[:space:]]*\).*/\1/p" /etc/fstab )' -- $cur ) ) COMPREPLY=( $( compgen -W '$(sed -ne "s/^[[:space:]]*LABEL=\([^[:space:]]*\).*/\1/p" /etc/fstab )' -- "$cur" ) )
elif [ $prev = -U ]; then elif [ $prev = -U ]; then
COMPREPLY=( $( compgen -W '$(sed -ne "s/^[[:space:]]*UUID=\([^[:space:]]*\).*/\1/p" /etc/fstab )' -- $cur ) ) COMPREPLY=( $( compgen -W '$(sed -ne "s/^[[:space:]]*UUID=\([^[:space:]]*\).*/\1/p" /etc/fstab )' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W "$( awk '! /^[ \t]*#/ {if ($2 ~ /\//) print $2}' /etc/fstab )" -- $cur ) ) COMPREPLY=( $( compgen -W "$( awk '! /^[ \t]*#/ {if ($2 ~ /\//) print $2}' /etc/fstab )" -- "$cur" ) )
fi fi
fi fi
@ -987,7 +987,7 @@ _renice()
curopt=${COMP_WORDS[COMP_CWORD-$i]} curopt=${COMP_WORDS[COMP_CWORD-$i]}
case "$curopt" in case "$curopt" in
-u) -u)
COMPREPLY=( $( compgen -u -- $cur ) ) COMPREPLY=( $( compgen -u -- "$cur" ) )
;; ;;
-g) -g)
_pgids _pgids
@ -1095,7 +1095,7 @@ _ipsec()
COMPREPLY=( $( compgen -W 'auto barf eroute klipsdebug look \ COMPREPLY=( $( compgen -W 'auto barf eroute klipsdebug look \
manual pluto ranbits rsasigkey \ manual pluto ranbits rsasigkey \
setup showdefaults showhostkey spi \ setup showdefaults showhostkey spi \
spigrp tncfg whack' -- $cur ) ) spigrp tncfg whack' -- "$cur" ) )
return 0 return 0
fi fi
@ -1104,18 +1104,18 @@ _ipsec()
COMPREPLY=( $( compgen -W '--asynchronous --up --add --delete \ COMPREPLY=( $( compgen -W '--asynchronous --up --add --delete \
--replace --down --route --unroute \ --replace --down --route --unroute \
--ready --status --rereadsecrets' \ --ready --status --rereadsecrets' \
-- $cur ) ) -- "$cur" ) )
;; ;;
manual) manual)
COMPREPLY=( $( compgen -W '--up --down --route --unroute \ COMPREPLY=( $( compgen -W '--up --down --route --unroute \
--union' -- $cur ) ) --union' -- "$cur" ) )
;; ;;
ranbits) ranbits)
COMPREPLY=( $( compgen -W '--quick --continuous --bytes' \ COMPREPLY=( $( compgen -W '--quick --continuous --bytes' \
-- $cur ) ) -- $cur ) )
;; ;;
setup) setup)
COMPREPLY=( $( compgen -W '--start --stop --restart' -- $cur ) ) COMPREPLY=( $( compgen -W '--start --stop --restart' -- "$cur" ) )
;; ;;
*) *)
@ -1294,7 +1294,7 @@ _known_hosts_real()
# append any available aliases from config files # append any available aliases from config files
if [ ${#config[@]} -gt 0 ] && [ -n "$aliases" ]; then if [ ${#config[@]} -gt 0 ] && [ -n "$aliases" ]; then
local host_aliases=$( sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\?['"$'\t '"']\+\([^#*?]*\)\(#.*\)\?$/\2/p' "${config[@]}" ) local host_aliases=$( sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\?['"$'\t '"']\+\([^#*?]*\)\(#.*\)\?$/\2/p' "${config[@]}" )
hosts=$( compgen -W "$host_aliases" -- $cur ) hosts=$( compgen -W "$host_aliases" -- "$cur" )
COMPREPLY=( "${COMPREPLY[@]}" $hosts ) COMPREPLY=( "${COMPREPLY[@]}" $hosts )
fi fi
@ -1309,7 +1309,7 @@ _known_hosts_real()
if [ -n "$(pidof avahi-daemon)" ]; then if [ -n "$(pidof avahi-daemon)" ]; then
COMPREPLY=( "${COMPREPLY[@]}" $( COMPREPLY=( "${COMPREPLY[@]}" $(
compgen -W "$( avahi-browse -cpr _workstation._tcp | \ compgen -W "$( avahi-browse -cpr _workstation._tcp | \
grep ^= | cut -d\; -f7 | sort -u )" -- $cur ) ) grep ^= | cut -d\; -f7 | sort -u )" -- "$cur" ) )
fi fi
fi fi
@ -1322,7 +1322,7 @@ _known_hosts_real()
# Add results of normal hostname completion, unless `COMP_KNOWN_HOSTS_WITH_HOSTFILE' # Add results of normal hostname completion, unless `COMP_KNOWN_HOSTS_WITH_HOSTFILE'
# is set to an empty value. # is set to an empty value.
if [ -n "${COMP_KNOWN_HOSTS_WITH_HOSTFILE-1}" ]; then if [ -n "${COMP_KNOWN_HOSTS_WITH_HOSTFILE-1}" ]; then
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -A hostname -P "$prefix$user" -S "$suffix" -- $cur ) ) COMPREPLY=( "${COMPREPLY[@]}" $( compgen -A hostname -P "$prefix$user" -S "$suffix" -- "$cur" ) )
fi fi
return 0 return 0
@ -1441,7 +1441,7 @@ _command_offset()
cur=`_get_cword` cur=`_get_cword`
if [[ $COMP_CWORD -eq 0 ]]; then if [[ $COMP_CWORD -eq 0 ]]; then
COMPREPLY=( $( compgen -c -- $cur ) ) COMPREPLY=( $( compgen -c -- "$cur" ) )
else else
cmd=${COMP_WORDS[0]} cmd=${COMP_WORDS[0]}
if complete -p $cmd &>/dev/null; then if complete -p $cmd &>/dev/null; then
@ -1510,7 +1510,7 @@ _longopt()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W "$( $1 --help 2>&1 | sed -e '/--/!d' \ COMPREPLY=( $( compgen -W "$( $1 --help 2>&1 | sed -e '/--/!d' \
-e 's/.*\(--[-A-Za-z0-9]\+\).*/\1/' |sort -u )"\ -e 's/.*\(--[-A-Za-z0-9]\+\).*/\1/' |sort -u )"\
-- $cur ) ) -- "$cur" ) )
elif [[ "$1" == rmdir ]]; then elif [[ "$1" == rmdir ]]; then
_filedir -d _filedir -d
else else
@ -1561,9 +1561,9 @@ _id()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-a -g --group -G --groups -n --name\ COMPREPLY=( $( compgen -W '-a -g --group -G --groups -n --name\
-r --real -u --user --help --version' -- $cur ) ) -r --real -u --user --help --version' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -u $cur ) ) COMPREPLY=( $( compgen -u "$cur" ) )
fi fi
} && } &&
complete -F _id id complete -F _id id

View File

@ -27,7 +27,7 @@ _ant()
;; ;;
-nice) -nice)
COMPREPLY=( $( compgen -W '1 2 3 4 5 6 7 8 9 10' \ COMPREPLY=( $( compgen -W '1 2 3 4 5 6 7 8 9 10' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-lib|-logger|-listener|-D|-inputhandler|-main) -lib|-logger|-listener|-D|-inputhandler|-main)
@ -41,7 +41,7 @@ _ant()
-lib -logfile -l -logger -listener -noinput -buildfile \ -lib -logfile -l -logger -listener -noinput -buildfile \
-file -f -D -keep-going -k -propertyfile -inputhandler \ -file -f -D -keep-going -k -propertyfile -inputhandler \
-find -s -nice -nouserlib -noclasspath -autoproxy \ -find -s -nice -nouserlib -noclasspath -autoproxy \
-main' -- $cur ) ) -main' -- "$cur" ) )
else else
# available targets completion # available targets completion
# find which buildfile to use # find which buildfile to use
@ -60,7 +60,7 @@ _ant()
COMPREPLY=( $( compgen -W "$( cat $buildfile | \ COMPREPLY=( $( compgen -W "$( cat $buildfile | \
tr "'\t\n>" "\" \n" | \ tr "'\t\n>" "\" \n" | \
sed -ne 's/.*<target .*name="\([^"]*\).*/\1/p' \ sed -ne 's/.*<target .*name="\([^"]*\).*/\1/p' \
2>/dev/null )" -- $cur ) ) 2>/dev/null )" -- "$cur" ) )
fi fi
} }
have complete-ant-cmd.pl && \ have complete-ant-cmd.pl && \

View File

@ -32,7 +32,7 @@ _apt_get()
return 0 return 0
;; ;;
*) *)
COMPREPLY=( $( apt-cache --no-generate pkgnames $cur 2> /dev/null ) ) COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" 2> /dev/null ) )
return 0 return 0
;; ;;
@ -68,12 +68,12 @@ _apt_get()
--list-cleanup --default-release \ --list-cleanup --default-release \
--trivial-only --no-remove --diff-only \ --trivial-only --no-remove --diff-only \
--no-install-recommends \ --no-install-recommends \
--tar-only --config-file --option --auto-remove' -- $cur ) ) --tar-only --config-file --option --auto-remove' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W 'update upgrade dselect-upgrade \ COMPREPLY=( $( compgen -W 'update upgrade dselect-upgrade \
dist-upgrade install remove purge source build-dep \ dist-upgrade install remove purge source build-dep \
check clean autoclean autoremove' -- $cur ) ) check clean autoclean autoremove' -- "$cur" ) )
fi fi
@ -118,7 +118,7 @@ _apt_cache()
;; ;;
*) *)
COMPREPLY=( $( apt-cache --no-generate pkgnames $cur 2> /dev/null ) ) COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" 2> /dev/null ) )
return 0 return 0
;; ;;
@ -145,13 +145,13 @@ _apt_cache()
--quiet --important --full --all-versions \ --quiet --important --full --all-versions \
--no-all-versions --generate --no-generate \ --no-all-versions --generate --no-generate \
--names-only --all-names --recurse \ --names-only --all-names --recurse \
--config-file --option --installed' -- $cur ) ) --config-file --option --installed' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W 'add gencaches show showpkg showsrc \ COMPREPLY=( $( compgen -W 'add gencaches show showpkg showsrc \
stats dump dumpavail unmet search search \ stats dump dumpavail unmet search search \
depends rdepends pkgnames dotty xvcg \ depends rdepends pkgnames dotty xvcg \
policy madison' -- $cur ) ) policy madison' -- "$cur" ) )
fi fi

View File

@ -21,12 +21,12 @@ _apt_build()
if [ -n "$special" ]; then if [ -n "$special" ]; then
case $special in case $special in
@(install|source|info)) @(install|source|info))
COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) ) COMPREPLY=( $( apt-cache pkgnames "$cur" 2> /dev/null ) )
return 0 return 0
;; ;;
remove) remove)
COMPREPLY=( $( _comp_dpkg_installed_packages \ COMPREPLY=( $( _comp_dpkg_installed_packages \
$cur ) ) "$cur" ) )
return 0 return 0
;; ;;
*) *)
@ -54,12 +54,12 @@ _apt_build()
--build-command --reinstall --rebuild \ --build-command --reinstall --rebuild \
--remove-builddep --no-wrapper --purge \ --remove-builddep --no-wrapper --purge \
--patch --patch-strip -p --yes -y \ --patch --patch-strip -p --yes -y \
--version -v --no-source' -- $cur ) ) --version -v --no-source' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W 'update upgrade install remove \ COMPREPLY=( $( compgen -W 'update upgrade install remove \
source dist-upgrade world clean info \ source dist-upgrade world clean info \
clean-build update-repository ' -- $cur ) ) clean-build update-repository ' -- "$cur" ) )
fi fi

View File

@ -50,11 +50,11 @@ _aptitude()
return 0 return 0
;; ;;
@(purge|remove|reinstall|forbid-version)) @(purge|remove|reinstall|forbid-version))
COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) ) COMPREPLY=( $( _comp_dpkg_installed_packages "$cur" ) )
return 0 return 0
;; ;;
unhold) unhold)
COMPREPLY=( $( _comp_dpkg_hold_packages $cur ) ) COMPREPLY=( $( _comp_dpkg_hold_packages "$cur" ) )
return 0 return 0
;; ;;
@ -82,13 +82,13 @@ _aptitude()
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W "$dashoptions" -- $cur ) ) COMPREPLY=( $( compgen -W "$dashoptions" -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W 'update upgrade safe-upgrade forget-new clean \ COMPREPLY=( $( compgen -W 'update upgrade safe-upgrade forget-new clean \
autoclean install reinstall remove \ autoclean install reinstall remove \
hold unhold purge markauto unmarkauto why why-not \ hold unhold purge markauto unmarkauto why why-not \
dist-upgrade full-upgrade download search show \ dist-upgrade full-upgrade download search show \
forbid-version changelog keep-all build-dep' -- $cur ) ) forbid-version changelog keep-all build-dep' -- "$cur" ) )
fi fi

View File

@ -14,7 +14,7 @@ _aspell_dictionary()
COMPREPLY=( ${COMPREPLY[@]#$datadir/} ) COMPREPLY=( ${COMPREPLY[@]#$datadir/} )
# Then, add the canonical dicts # Then, add the canonical dicts
COMPREPLY=( "${COMPREPLY[@]}" $( aspell dicts 2>/dev/null ) ) COMPREPLY=( "${COMPREPLY[@]}" $( aspell dicts 2>/dev/null ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) ) COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
} }
_aspell() _aspell()
@ -37,19 +37,19 @@ _aspell()
return 0 return 0
;; ;;
dump|create|merge) dump|create|merge)
COMPREPLY=( $( compgen -W 'master personal repl' -- $cur ) ) COMPREPLY=( $( compgen -W 'master personal repl' -- "$cur" ) )
return 0 return 0
;; ;;
--mode) --mode)
COMPREPLY=( $( compgen -W 'none url email sgml tex' -- $cur ) ) COMPREPLY=( $( compgen -W 'none url email sgml tex' -- "$cur" ) )
return 0 return 0
;; ;;
--sug-mode) --sug-mode)
COMPREPLY=( $( compgen -W 'ultra fast normal bad-speller' -- $cur ) ) COMPREPLY=( $( compgen -W 'ultra fast normal bad-speller' -- "$cur" ) )
return 0 return 0
;; ;;
--keymapping) --keymapping)
COMPREPLY=( $( compgen -W 'aspell ispell' -- $cur ) ) COMPREPLY=( $( compgen -W 'aspell ispell' -- "$cur" ) )
return 0 return 0
;; ;;
-d|--master) -d|--master)
@ -81,11 +81,11 @@ _aspell()
--rem-tex-command --tex-check-comments \ --rem-tex-command --tex-check-comments \
--dont-tex-check-comments --add-tex-extension \ --dont-tex-check-comments --add-tex-extension \
--rem-tex-extension --add-sgml-check --rem-sgml-check \ --rem-tex-extension --add-sgml-check --rem-sgml-check \
--add-sgml-extension --rem-sgml-extension' -- $cur ) ) --add-sgml-extension --rem-sgml-extension' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W '-? help -c check -a pipe -l list \ COMPREPLY=( $( compgen -W '-? help -c check -a pipe -l list \
config config soundslike filter -v version dump \ config config soundslike filter -v version dump \
create merge' -- $cur ) ) create merge' -- "$cur" ) )
fi fi
} }

View File

@ -13,7 +13,7 @@ _autorpm()
COMPREPLY=( $( compgen -W '--notty --debug --help --version \ COMPREPLY=( $( compgen -W '--notty --debug --help --version \
auto add fullinfo info help install list \ auto add fullinfo info help install list \
remove set' -- $cur ) ) remove set' -- "$cur" ) )
} && } &&
complete -F _autorpm autorpm complete -F _autorpm autorpm

View File

@ -14,7 +14,7 @@ _alias()
case "$COMP_LINE" in case "$COMP_LINE" in
*[^=]) *[^=])
COMPREPLY=( $( compgen -A alias -- $cur ) ) COMPREPLY=( $( compgen -A alias -- "$cur" ) )
;; ;;
*=) *=)
COMPREPLY=( "$( alias ${cur%=} 2>/dev/null | \ COMPREPLY=( "$( alias ${cur%=} 2>/dev/null | \
@ -35,10 +35,10 @@ _export()
case "$COMP_LINE" in case "$COMP_LINE" in
*=\$*) *=\$*)
COMPREPLY=( $( compgen -v -P '$' -- ${cur#*=\$} ) ) COMPREPLY=( $( compgen -v -P '$' -- "${cur#*=\$}" ) )
;; ;;
*[^=]) *[^=])
COMPREPLY=( $( compgen -v -S '=' -- $cur ) ) COMPREPLY=( $( compgen -v -S '=' -- "$cur" ) )
;; ;;
*=) *=)
COMPREPLY=( "$( eval echo -n \"$`echo ${cur%=}`\" | COMPREPLY=( "$( eval echo -n \"$`echo ${cur%=}`\" |
@ -62,13 +62,13 @@ _function()
if [[ $1 == @(declare|typeset) ]]; then if [[ $1 == @(declare|typeset) ]]; then
if [ "$prev" = -f ]; then if [ "$prev" = -f ]; then
COMPREPLY=( $( compgen -A function -- $cur ) ) COMPREPLY=( $( compgen -A function -- "$cur" ) )
elif [[ "$cur" == -* ]]; then elif [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-a -f -F -i -r -x -p' -- \ COMPREPLY=( $( compgen -W '-a -f -F -i -r -x -p' -- \
$cur ) ) "$cur" ) )
fi fi
elif [ $COMP_CWORD -eq 1 ]; then elif [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -A function -- $cur ) ) COMPREPLY=( $( compgen -A function -- "$cur" ) )
else else
COMPREPLY=( "() $( type -- ${COMP_WORDS[1]} | sed -e 1,2d )" ) COMPREPLY=( "() $( type -- ${COMP_WORDS[1]} | sed -e 1,2d )" )
fi fi
@ -90,7 +90,7 @@ _complete()
options="default dirnames filenames" options="default dirnames filenames"
[ -n "$bash205b" ] && options="$options nospace" [ -n "$bash205b" ] && options="$options nospace"
[ -n "$bash3" ] && options="$options bashdefault plusdirs" [ -n "$bash3" ] && options="$options bashdefault plusdirs"
COMPREPLY=( $( compgen -W "$options" -- $cur ) ) COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
return 0 return 0
;; ;;
@ -99,21 +99,21 @@ _complete()
builtin command directory disabled enabled \ builtin command directory disabled enabled \
export file function group helptopic hostname \ export file function group helptopic hostname \
job keyword running service setopt shopt \ job keyword running service setopt shopt \
signal stopped user variable' -- $cur ) ) signal stopped user variable' -- "$cur" ) )
return 0 return 0
;; ;;
-C) -C)
COMPREPLY=( $( compgen -A command -- $cur ) ) COMPREPLY=( $( compgen -A command -- "$cur" ) )
return 0 return 0
;; ;;
-F) -F)
COMPREPLY=( $( compgen -A function -- $cur ) ) COMPREPLY=( $( compgen -A function -- "$cur" ) )
return 0 return 0
;; ;;
-@(p|r)) -@(p|r))
COMPREPLY=( $( complete -p | sed -e 's|.* ||' ) ) COMPREPLY=( $( complete -p | sed -e 's|.* ||' ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) ) COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
return 0 return 0
;; ;;
@ -123,9 +123,9 @@ _complete()
# relevant options completion # relevant options completion
options="-a -b -c -d -e -f -g -j -k -s -v -u -A -G -W -P -S -X -F -C" options="-a -b -c -d -e -f -g -j -k -s -v -u -A -G -W -P -S -X -F -C"
[ -n "$bash205" ] && options="$options -o" [ -n "$bash205" ] && options="$options -o"
COMPREPLY=( $( compgen -W "$options" -- $cur ) ) COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
else else
COMPREPLY=( $( compgen -A command -- $cur ) ) COMPREPLY=( $( compgen -A command -- "$cur" ) )
fi fi
} }
complete -F _complete complete complete -F _complete complete

View File

@ -14,6 +14,6 @@ _nslookup()
COMPREPLY=( $( compgen -P '-' -W 'all class= debug d2 domain= \ COMPREPLY=( $( compgen -P '-' -W 'all class= debug d2 domain= \
srchlist= defname search port= querytype= \ srchlist= defname search port= querytype= \
type= recurse retry root timeout vc \ type= recurse retry root timeout vc \
ignoretc' -- $cur ) ) ignoretc' -- "$cur" ) )
} && } &&
complete -F _nslookup nslookup complete -F _nslookup nslookup

View File

@ -32,7 +32,7 @@ _btdownload()
--max_allow_in --check_hashes \ --max_allow_in --check_hashes \
--max_upload_rate --snub_time --spew \ --max_upload_rate --snub_time --spew \
--rarest_first_cutoff --min_uploads \ --rarest_first_cutoff --min_uploads \
--report_hash_failures' -- $cur ) ) --report_hash_failures' -- "$cur" ) )
else else
_filedir _filedir
fi fi

View File

@ -8,27 +8,27 @@ _bluetooth_adresses()
{ {
if [ -n "${COMP_BLUETOOTH_SCAN:-}" ]; then if [ -n "${COMP_BLUETOOTH_SCAN:-}" ]; then
COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "$( hcitool scan | \ COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "$( hcitool scan | \
awk '/^\t/{print $1}' )" -- $cur ) ) awk '/^\t/{print $1}' )" -- "$cur" ) )
fi fi
} }
_bluetooth_devices() _bluetooth_devices()
{ {
COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "$( hcitool dev | \ COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "$( hcitool dev | \
awk '/^\t/{print $1}' )" -- $cur ) ) awk '/^\t/{print $1}' )" -- "$cur" ) )
} }
_bluetooth_services() _bluetooth_services()
{ {
COMPREPLY=( $( compgen -W 'DID SP DUN LAN FAX OPUSH FTP HS HF HFAG \ 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 \ SAP NAP GN PANU HCRP HID CIP A2SRC A2SNK AVRCT AVRTG UDIUE \
UDITE SYNCML' -- $cur ) ) UDITE SYNCML' -- "$cur" ) )
} }
_bluetooth_packet_types() _bluetooth_packet_types()
{ {
COMPREPLY=( $( compgen -W 'DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3' -- \ COMPREPLY=( $( compgen -W 'DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3' -- \
$cur ) ) "$cur" ) )
} }
_get_command() _get_command()
@ -60,7 +60,7 @@ _hcitool()
return 0; return 0;
;; ;;
--role) --role)
COMPREPLY=( $( compgen -W 'm s' -- $cur ) ) COMPREPLY=( $( compgen -W 'm s' -- "$cur" ) )
return 0; return 0;
;; ;;
--pkt-type) --pkt-type)
@ -74,11 +74,11 @@ _hcitool()
_get_command _get_command
if [ -z $command ]; then if [ -z $command ]; then
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h -i' -- $cur ) ) COMPREPLY=( $( compgen -W '-h -i' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W 'dev inq scan name info \ COMPREPLY=( $( compgen -W 'dev inq scan name info \
spinq epinq cmd con cc dc sr cpt rssi lq tpl \ spinq epinq cmd con cc dc sr cpt rssi lq tpl \
afh lst auth enc key clkoff clock' -- $cur ) ) afh lst auth enc key clkoff clock' -- "$cur" ) )
fi fi
else else
case $command in case $command in
@ -91,7 +91,7 @@ _hcitool()
cc) cc)
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--role \ COMPREPLY=( $( compgen -W '--role \
--pkt-type' -- $cur ) ) --pkt-type' -- "$cur" ) )
else else
_count_args _count_args
if [ $args -eq 2 ]; then if [ $args -eq 2 ]; then
@ -105,7 +105,7 @@ _hcitool()
_bluetooth_adresses _bluetooth_adresses
else else
COMPREPLY=( $( compgen -W \ COMPREPLY=( $( compgen -W \
'master slave' -- $cur ) ) 'master slave' -- "$cur" ) )
fi fi
;; ;;
cpt) cpt)
@ -122,7 +122,7 @@ _hcitool()
_bluetooth_adresses _bluetooth_adresses
else else
COMPREPLY=( $( compgen -W \ COMPREPLY=( $( compgen -W \
'0 1' -- $cur ) ) '0 1' -- "$cur" ) )
fi fi
;; ;;
esac esac
@ -152,17 +152,17 @@ _sdptool()
_get_command _get_command
if [ -z $command ]; then if [ -z $command ]; then
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--help' -- $cur ) ) COMPREPLY=( $( compgen -W '--help' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W 'search browse records add \ COMPREPLY=( $( compgen -W 'search browse records add \
del get setattr setseq' -- $cur ) ) del get setattr setseq' -- "$cur" ) )
fi fi
else else
case $command in case $command in
search) search)
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--bdaddr \ COMPREPLY=( $( compgen -W '--bdaddr \
--tree --raw --xml' -- $cur ) ) --tree --raw --xml' -- "$cur" ) )
else else
_bluetooth_services _bluetooth_services
fi fi
@ -170,7 +170,7 @@ _sdptool()
@(browse|records)) @(browse|records))
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--tree \ COMPREPLY=( $( compgen -W '--tree \
--raw --xml' -- $cur ) ) --raw --xml' -- "$cur" ) )
else else
_bluetooth_adresses _bluetooth_adresses
fi fi
@ -178,7 +178,7 @@ _sdptool()
add) add)
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--handle \ COMPREPLY=( $( compgen -W '--handle \
--channel' -- $cur ) ) --channel' -- "$cur" ) )
else else
_bluetooth_services _bluetooth_services
fi fi
@ -186,7 +186,7 @@ _sdptool()
get) get)
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--bdaddr \ COMPREPLY=( $( compgen -W '--bdaddr \
--tree --raw --xml' -- $cur ) ) --tree --raw --xml' -- "$cur" ) )
fi fi
;; ;;
esac esac
@ -210,7 +210,7 @@ _l2ping()
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -s -c -t -f -r' -- $cur ) ) COMPREPLY=( $( compgen -W '-i -s -c -t -f -r' -- "$cur" ) )
else else
_bluetooth_adresses _bluetooth_adresses
fi fi
@ -243,10 +243,10 @@ _rfcomm()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h --help -a -r --raw -f \ COMPREPLY=( $( compgen -W '-h --help -a -r --raw -f \
--config -i -A --auth -E --encrypt -S --secure \ --config -i -A --auth -E --encrypt -S --secure \
-M --master' -- $cur ) ) -M --master' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W 'show connect listen watch \ COMPREPLY=( $( compgen -W 'show connect listen watch \
bind release' -- $cur ) ) bind release' -- "$cur" ) )
fi fi
else else
_count_args _count_args
@ -284,10 +284,10 @@ _ciptool()
_get_command _get_command
if [ -z $command ]; then if [ -z $command ]; then
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h --help -i' -- $cur ) ) COMPREPLY=( $( compgen -W '-h --help -i' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W 'show search connect release \ COMPREPLY=( $( compgen -W 'show search connect release \
loopback' -- $cur ) ) loopback' -- "$cur" ) )
fi fi
else else
case $command in case $command in
@ -318,13 +318,13 @@ _dfutool()
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h --help -d --device' -- $cur ) ) COMPREPLY=( $( compgen -W '-h --help -d --device' -- "$cur" ) )
else else
_count_args _count_args
case $args in case $args in
1) 1)
COMPREPLY=( $( compgen -W 'verify modify \ COMPREPLY=( $( compgen -W 'verify modify \
upgrade archive' -- $cur ) ) upgrade archive' -- "$cur" ) )
;; ;;
2) 2)
_filedir _filedir
@ -344,7 +344,7 @@ _hciconfig()
_get_command _get_command
if [ -z $command ]; then if [ -z $command ]; then
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h --help -a --all' -- $cur ) ) COMPREPLY=( $( compgen -W '-h --help -a --all' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W 'up down reset rstat auth \ COMPREPLY=( $( compgen -W 'up down reset rstat auth \
noauth encrypt noencrypt secmgr nosecmgr \ noauth encrypt noencrypt secmgr nosecmgr \
@ -352,7 +352,7 @@ _hciconfig()
voice iac inqmode inqdata inqtype inqparams \ voice iac inqmode inqdata inqtype inqparams \
pageparms pageto afhmode aclmtu scomtu putkey \ pageparms pageto afhmode aclmtu scomtu putkey \
delkey commands features version revision lm' \ delkey commands features version revision lm' \
-- $cur ) ) -- "$cur" ) )
fi fi
else else
case $command in case $command in
@ -366,7 +366,7 @@ _hciconfig()
_count_args _count_args
if [ $args -eq 2 ]; then if [ $args -eq 2 ]; then
COMPREPLY=( $( compgen -W 'MASTER \ COMPREPLY=( $( compgen -W 'MASTER \
SLAVE NONE ACCEPT' -- $cur ) ) SLAVE NONE ACCEPT' -- "$cur" ) )
fi fi
;; ;;
ptype) ptype)
@ -388,28 +388,28 @@ _hciattach()
cur=`_get_cword` cur=`_get_cword`
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-n -p -t -b -s -l' -- $cur ) ) COMPREPLY=( $( compgen -W '-n -p -t -b -s -l' -- "$cur" ) )
else else
_count_args _count_args
case $args in case $args in
1) 1)
COMPREPLY=( $( command ls /dev/tty* ) ) COMPREPLY=( $( command ls /dev/tty* ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]} \ COMPREPLY=( $( compgen -W '${COMPREPLY[@]} \
${COMPREPLY[@]#/dev/}' -- $cur ) ) ${COMPREPLY[@]#/dev/}' -- "$cur" ) )
;; ;;
2) 2)
COMPREPLY=( $( compgen -W 'any ericsson digi \ COMPREPLY=( $( compgen -W 'any ericsson digi \
xircom csr bboxes swave bcsp 0x0105 \ xircom csr bboxes swave bcsp 0x0105 \
0x080a 0x0160 0x0002' -- $cur ) ) 0x080a 0x0160 0x0002' -- "$cur" ) )
;; ;;
3) 3)
COMPREPLY=( $( compgen -W '9600 19200 38400 \ COMPREPLY=( $( compgen -W '9600 19200 38400 \
57600 115200 230400 460800 921600' \ 57600 115200 230400 460800 921600' \
-- $cur ) ) -- "$cur" ) )
;; ;;
4) 4)
COMPREPLY=( $( compgen -W 'flow noflow' \ COMPREPLY=( $( compgen -W 'flow noflow' \
-- $cur ) ) -- "$cur" ) )
;; ;;
5) 5)
_bluetooth_adresses _bluetooth_adresses
@ -429,7 +429,7 @@ _hid2hci()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h --help -q --quiet -0 --tohci -1 \ COMPREPLY=( $( compgen -W '-h --help -q --quiet -0 --tohci -1 \
--tohid' -- $cur ) ) --tohid' -- "$cur" ) )
fi fi
} }
complete -F _hid2hci hid2hci complete -F _hid2hci hid2hci
@ -442,11 +442,11 @@ _avctrl()
cur=`_get_cword` cur=`_get_cword`
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h --help -q --quiet' -- $cur ) ) COMPREPLY=( $( compgen -W '-h --help -q --quiet' -- "$cur" ) )
else else
_count_args _count_args
if [ $args -eq 1 ]; then if [ $args -eq 1 ]; then
COMPREPLY=( $( compgen -W 'discover switch' -- $cur ) ) COMPREPLY=( $( compgen -W 'discover switch' -- "$cur" ) )
fi fi
fi fi
} }

View File

@ -17,7 +17,7 @@ _brctl()
COMPREPLY=( $( compgen -W "addbr delbr addif delif \ COMPREPLY=( $( compgen -W "addbr delbr addif delif \
setageing setbridgeprio setfd sethello \ setageing setbridgeprio setfd sethello \
setmaxage setpathcost setportprio show \ setmaxage setpathcost setportprio show \
showmacs showstp stp" -- $cur ) ) showmacs showstp stp" -- "$cur" ) )
;; ;;
2) 2)
case $command in case $command in
@ -26,7 +26,7 @@ _brctl()
*) *)
COMPREPLY=( $( compgen -W "$(brctl \ COMPREPLY=( $( compgen -W "$(brctl \
show | sed '1d' | \ show | sed '1d' | \
awk '{print $1}' )" -- $cur ) ) awk '{print $1}' )" -- "$cur" ) )
esac esac
;; ;;
3) 3)
@ -35,7 +35,7 @@ _brctl()
_configured_interfaces _configured_interfaces
;; ;;
stp) stp)
COMPREPLY=( $( compgen -W 'on off' -- $cur ) ) COMPREPLY=( $( compgen -W 'on off' -- "$cur" ) )
;; ;;
esac esac
;; ;;

View File

@ -17,7 +17,7 @@ _bzip2()
-t -v -V -z -1 -2 -3 -4 -5 -6 -7 -8 -9 \ -t -v -V -z -1 -2 -3 -4 -5 -6 -7 -8 -9 \
--help --decompress --compress --keep --force \ --help --decompress --compress --keep --force \
--test --stdout --quiet --verbose --license \ --test --stdout --quiet --verbose --license \
--version --small --fast --best' -- $cur ) ) --version --small --fast --best' -- "$cur" ) )
return 0 return 0
fi fi
@ -36,7 +36,7 @@ _bzip2()
_expand || return 0 _expand || return 0
COMPREPLY=( $( compgen -f -X "$xspec" -- $cur ) \ COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
$( compgen -d -- $cur ) ) $( compgen -d -- "$cur" ) )
} && } &&
complete -F _bzip2 $filenames bzip2 complete -F _bzip2 $filenames bzip2

View File

@ -14,7 +14,7 @@ _cardctl()
if [ $COMP_CWORD -eq 1 ]; then if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W 'status config ident suspend \ COMPREPLY=( $( compgen -W 'status config ident suspend \
resume reset eject insert scheme' \ resume reset eject insert scheme' \
-- $cur ) ) -- "$cur" ) )
fi fi
} && } &&
complete -F _cardctl cardctl complete -F _cardctl cardctl

View File

@ -15,7 +15,7 @@ _cfagent_options()
-N --negate --undefine -p --parse-only -P --no-processes -q \ -N --negate --undefine -p --parse-only -P --no-processes -q \
--no-splay -s --no-commands -S --silent -t --no-tidy -u \ --no-splay -s --no-commands -S --silent -t --no-tidy -u \
--use-env -U --underscore-classes -v --verbose -V --version \ --use-env -U --underscore-classes -v --verbose -V --version \
-x --no-preconf -X --no-links -w --no-warn --quiet' -- $cur ) ) -x --no-preconf -X --no-links -w --no-warn --quiet' -- "$cur" ) )
} }
_cfagent() _cfagent()
@ -77,7 +77,7 @@ _cfrun()
[ ! -f $hostfile ] && return 0 [ ! -f $hostfile ] && return 0
COMPREPLY=( $(compgen -W "$( grep -v \ COMPREPLY=( $(compgen -W "$( grep -v \
-E '(=|^$|^#)' $hostfile )" -- $cur ) ) -E '(=|^$|^#)' $hostfile )" -- "$cur" ) )
fi fi
;; ;;
2) 2)

View File

@ -20,7 +20,7 @@ _chkconfig()
return 0 return 0
;; ;;
--level) --level)
COMPREPLY=( $( compgen -W '1 2 3 4 5 6' -- $cur ) ) COMPREPLY=( $( compgen -W '1 2 3 4 5 6' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -29,11 +29,11 @@ _chkconfig()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--list --add --del --override \ COMPREPLY=( $( compgen -W '--list --add --del --override \
--level' -- $cur ) ) --level' -- "$cur" ) )
else else
if [ $COMP_CWORD -eq 2 -o $COMP_CWORD -eq 4 ]; then if [ $COMP_CWORD -eq 2 -o $COMP_CWORD -eq 4 ]; then
COMPREPLY=( $( compgen -W 'on off reset \ COMPREPLY=( $( compgen -W 'on off reset \
resetpriorities' -- $cur ) ) resetpriorities' -- "$cur" ) )
else else
_services _services
fi fi

View File

@ -14,7 +14,7 @@ _chsh()
if [ "$prev" = "-s" ]; then if [ "$prev" = "-s" ]; then
_shells _shells
else else
COMPREPLY=( $( compgen -u -- $cur ) ) COMPREPLY=( $( compgen -u -- "$cur" ) )
fi fi
return 0 return 0

View File

@ -10,7 +10,7 @@ _cksfv()
cur=`_get_cword` cur=`_get_cword`
if [ $COMP_CWORD -eq 1 ]; then if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W '-C -f -i -q -v' -- $cur ) ) COMPREPLY=( $( compgen -W '-C -f -i -q -v' -- "$cur" ) )
return 0 return 0
fi fi

View File

@ -17,7 +17,7 @@ _clisp()
COMPREPLY=( $( compgen -W '-h --help --version --license -B -K \ COMPREPLY=( $( compgen -W '-h --help --version --license -B -K \
-M -m -L -N -E -q --quiet --silent -w -I -ansi \ -M -m -L -N -E -q --quiet --silent -w -I -ansi \
-traditional -p -C -norc -i -c -l -o -x ' \ -traditional -p -C -norc -i -c -l -o -x ' \
-- $cur ) ) -- "$cur" ) )
else else
_filedir _filedir
fi fi

View File

@ -15,13 +15,13 @@ _cowsay()
case $prev in case $prev in
-f) -f)
COMPREPLY=( $( compgen -W '$( cowsay -l | tail -n +2 \ COMPREPLY=( $( compgen -W '$( cowsay -l | tail -n +2 \
)' -- $cur ) ) )' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
# relevant options completion # relevant options completion
COMPREPLY=( $( compgen -W '-b -d -g -p -s -t -w -y -e -f -h -l -n -T -W' -- $cur ) ) COMPREPLY=( $( compgen -W '-b -d -g -p -s -t -w -y -e -f -h -l -n -T -W' -- "$cur" ) )
} && } &&
complete -F _cowsay $default cowsay cowthink complete -F _cowsay $default cowsay cowthink

View File

@ -6,7 +6,7 @@
have cpio && { have cpio && {
_cpio_format() _cpio_format()
{ {
COMPREPLY=( $( compgen -W 'bin odc newc crc tar ustar hpbin hpodc' -- $cur ) ) COMPREPLY=( $( compgen -W 'bin odc newc crc tar ustar hpbin hpodc' -- "$cur" ) )
} }
_cpio() _cpio()
@ -34,7 +34,7 @@ _cpio()
return 0 return 0
;; ;;
--rsh-command) --rsh-command)
COMPREPLY=( $( compgen -c -- $cur ) ) COMPREPLY=( $( compgen -c -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -42,7 +42,7 @@ _cpio()
$split && return 0 $split && return 0
if [ $COMP_CWORD -eq 1 ]; then if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W '-o --create -i --extract -p --pass-through' -- $cur) ) COMPREPLY=( $( compgen -W '-o --create -i --extract -p --pass-through' -- "$cur" ) )
else else
case ${COMP_WORDS[1]} in case ${COMP_WORDS[1]} in
-@(o|-create)) -@(o|-create))
@ -53,7 +53,7 @@ _cpio()
--verbose --dot --append --block-size\ --verbose --dot --append --block-size\
--dereference --io-size --quiet\ --dereference --io-size --quiet\
--force-local --rsh-command --help\ --force-local --rsh-command --help\
--version' -- $cur ) ) --version' -- "$cur" ) )
fi fi
;; ;;
-@(i|-extract)) -@(i|-extract))
@ -72,7 +72,7 @@ _cpio()
--force-local --no-absolute-filenames\ --force-local --no-absolute-filenames\
--sparse --only-verify-crc --quiet\ --sparse --only-verify-crc --quiet\
--rsh-command --help\ --rsh-command --help\
--version' -- $cur ) ) --version' -- "$cur" ) )
fi fi
;; ;;
-@(p|-pass-through)) -@(p|-pass-through))
@ -84,7 +84,7 @@ _cpio()
--unconditional --verbose --dot\ --unconditional --verbose --dot\
--dereference --owner\ --dereference --owner\
--no-preserve-owner --sparse --help\ --no-preserve-owner --sparse --help\
--version' -- $cur ) ) --version' -- "$cur" ) )
else else
_filedir -d _filedir -d
fi fi

View File

@ -11,6 +11,6 @@ _cancel()
COMPREPLY=() COMPREPLY=()
cur=`_get_cword` cur=`_get_cword`
COMPREPLY=( $( compgen -W "$( lpstat | cut -d' ' -f1 )" -- $cur ) ) COMPREPLY=( $( compgen -W "$( lpstat | cut -d' ' -f1 )" -- "$cur" ) )
} && } &&
complete -F _cancel $filenames cancel complete -F _cancel $filenames cancel

View File

@ -126,7 +126,7 @@ _cvs()
$cur ) ) $cur ) )
fi fi
else else
COMPREPLY=( $( compgen -W '-k -m' -- $cur ) ) COMPREPLY=( $( compgen -W '-k -m' -- "$cur" ) )
fi fi
;; ;;
admin) admin)
@ -139,10 +139,10 @@ _cvs()
;; ;;
annotate) annotate)
if [[ "$cur" = -* ]]; then if [[ "$cur" = -* ]]; then
COMPREPLY=( $( compgen -W '-D -F -f -l -R -r' -- $cur ) ) COMPREPLY=( $( compgen -W '-D -F -f -l -R -r' -- "$cur" ) )
else else
get_entries get_entries
COMPREPLY=( $( compgen -W '${entries[@]}' -- $cur ) ) COMPREPLY=( $( compgen -W '${entries[@]}' -- "$cur" ) )
fi fi
;; ;;
checkout) checkout)
@ -150,10 +150,10 @@ _cvs()
[ -z "$cvsroot" ] && cvsroot=$CVSROOT [ -z "$cvsroot" ] && cvsroot=$CVSROOT
COMPREPLY=( $( cvs -d "$cvsroot" co -c 2> /dev/null | \ COMPREPLY=( $( cvs -d "$cvsroot" co -c 2> /dev/null | \
awk '{print $1}' ) ) awk '{print $1}' ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) ) COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W '-A -N -P -R -c -f -l -n -p \ COMPREPLY=( $( compgen -W '-A -N -P -R -c -f -l -n -p \
-s -r -D -d -k -j' -- $cur ) ) -s -r -D -d -k -j' -- "$cur" ) )
fi fi
;; ;;
commit) commit)
@ -173,7 +173,7 @@ _cvs()
newremoved=( $( cvs -q diff --brief 2>&1 | \ newremoved=( $( cvs -q diff --brief 2>&1 | \
sed -ne 's/^cvs diff: \([^ ]*\) .*, no comparison available$/\1/p' ) ) sed -ne 's/^cvs diff: \([^ ]*\) .*, no comparison available$/\1/p' ) )
COMPREPLY=( $( compgen -W '${changed[@]:-} \ COMPREPLY=( $( compgen -W '${changed[@]:-} \
${newremoved[@]:-}' -- $cur ) ) ${newremoved[@]:-}' -- "$cur" ) )
else else
COMPREPLY=( $(compgen $default -- "$cur") ) COMPREPLY=( $(compgen $default -- "$cur") )
fi fi
@ -186,17 +186,17 @@ _cvs()
if [ -r ~/.cvspass ]; then if [ -r ~/.cvspass ]; then
# Ugly escaping because of bash treating ':' specially # Ugly escaping because of bash treating ':' specially
cvsroots=$( sed 's/^[^ ]* //; s/:/\\:/g' ~/.cvspass ) cvsroots=$( sed 's/^[^ ]* //; s/:/\\:/g' ~/.cvspass )
COMPREPLY=( $( compgen -W '$cvsroots' -- $cur ) ) COMPREPLY=( $( compgen -W '$cvsroots' -- "$cur" ) )
fi fi
;; ;;
export) export)
if [[ "$cur" != -* ]]; then if [[ "$cur" != -* ]]; then
[ -z "$cvsroot" ] && cvsroot=$CVSROOT [ -z "$cvsroot" ] && cvsroot=$CVSROOT
COMPREPLY=( $( cvs -d "$cvsroot" co -c | awk '{print $1}' ) ) COMPREPLY=( $( cvs -d "$cvsroot" co -c | awk '{print $1}' ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) ) COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W '-N -f -l -R -n \ COMPREPLY=( $( compgen -W '-N -f -l -R -n \
-r -D -d -k' -- $cur ) ) -r -D -d -k' -- "$cur" ) )
fi fi
;; ;;
diff) diff)
@ -204,7 +204,7 @@ _cvs()
_longopt diff _longopt diff
else else
get_entries get_entries
COMPREPLY=( $( compgen -W '${entries[@]:-}' -- $cur ) ) COMPREPLY=( $( compgen -W '${entries[@]:-}' -- "$cur" ) )
fi fi
;; ;;
remove) remove)
@ -216,10 +216,10 @@ _cvs()
for i in "${entries[@]}"; do for i in "${entries[@]}"; do
[ ! -r "$i" ] && miss=( "${miss[@]}" $i ) [ ! -r "$i" ] && miss=( "${miss[@]}" $i )
done done
COMPREPLY=( $(compgen -W '${miss[@]:-}' -- $cur) ) COMPREPLY=( $(compgen -W '${miss[@]:-}' -- "$cur") )
fi fi
else else
COMPREPLY=( $( compgen -W '-f -l -R' -- $cur ) ) COMPREPLY=( $( compgen -W '-f -l -R' -- "$cur" ) )
fi fi
;; ;;
import) import)
@ -237,14 +237,14 @@ _cvs()
COMPREPLY=( $( compgen -W '${COMPREPLY[@]} $pwd' -- \ COMPREPLY=( $( compgen -W '${COMPREPLY[@]} $pwd' -- \
$cur ) ) $cur ) )
else else
COMPREPLY=( $( compgen -W '-d -k -I -b -m -W' -- $cur )) COMPREPLY=( $( compgen -W '-d -k -I -b -m -W' -- "$cur" ))
fi fi
;; ;;
update) update)
if [[ "$cur" = -* ]]; then if [[ "$cur" = -* ]]; then
COMPREPLY=( $( compgen -W '-A -P -C -d -f -l -R -p \ COMPREPLY=( $( compgen -W '-A -P -C -d -f -l -R -p \
-k -r -D -j -I -W' -- \ -k -r -D -j -I -W' -- \
$cur ) ) "$cur" ) )
fi fi
;; ;;
"") "")
@ -255,7 +255,7 @@ _cvs()
rfreeze rlog rm rtag stat status \ rfreeze rlog rm rtag stat status \
tag unedit up update -H -Q -q -b \ tag unedit up update -H -Q -q -b \
-d -e -f -l -n -t -r -v -w -x -z \ -d -e -f -l -n -t -r -v -w -x -z \
--help --version' -- $cur ) ) --help --version' -- "$cur" ) )
;; ;;
*) *)
;; ;;

View File

@ -15,6 +15,6 @@ _dcop()
else else
compstr=$( command echo ${COMP_WORDS[*]} | sed "s/ $cur$//" ) compstr=$( command echo ${COMP_WORDS[*]} | sed "s/ $cur$//" )
fi fi
COMPREPLY=( $( compgen -W '$( command $compstr | sed s/\(.*\)// )' -- $cur ) ) COMPREPLY=( $( compgen -W '$( command $compstr | sed s/\(.*\)// )' -- "$cur" ) )
} && } &&
complete -F _dcop dcop complete -F _dcop dcop

View File

@ -21,15 +21,15 @@ _dd()
cur=${cur#*=} cur=${cur#*=}
COMPREPLY=( $( compgen -W 'ascii ebcdic ibm block unblock \ COMPREPLY=( $( compgen -W 'ascii ebcdic ibm block unblock \
lcase notrunc ucase swab noerror sync' \ lcase notrunc ucase swab noerror sync' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
_expand || return 0 _expand || return 0
COMPREPLY=( $( compgen -W '--help --version' -- $cur ) \ COMPREPLY=( $( compgen -W '--help --version' -- "$cur" ) \
$( compgen -W 'bs cbs conv count ibs if obs of seek skip'\ $( compgen -W 'bs cbs conv count ibs if obs of seek skip'\
-S '=' -- $cur ) ) -S '=' -- "$cur" ) )
} && } &&
complete -F _dd $nospace $filenames dd complete -F _dd $nospace $filenames dd

View File

@ -24,7 +24,7 @@ have dhclient && _dhclient()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-p -d -q -1 -r -lf -pf \ COMPREPLY=( $( compgen -W '-p -d -q -1 -r -lf -pf \
-cf -sf -s -g -n -nw -w' -- $cur ) ) -cf -sf -s -g -n -nw -w' -- "$cur" ) )
else else
_available_interfaces _available_interfaces
fi fi

View File

@ -52,7 +52,7 @@ _dpkg()
return 0 return 0
;; ;;
-@(s|p|l|-@(status|print-avail|list))) -@(s|p|l|-@(status|print-avail|list)))
COMPREPLY=( $( apt-cache pkgnames $cur 2>/dev/null ) ) COMPREPLY=( $( apt-cache pkgnames "$cur" 2>/dev/null ) )
return 0 return 0
;; ;;
-@(S|-search)) -@(S|-search))
@ -60,7 +60,7 @@ _dpkg()
return 0 return 0
;; ;;
-@(r|L|P|-@(remove|purge|listfiles))) -@(r|L|P|-@(remove|purge|listfiles)))
COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) ) COMPREPLY=( $( _comp_dpkg_installed_packages "$cur" ) )
return 0 return 0
;; ;;
*) *)
@ -89,7 +89,7 @@ _dpkg()
--no-debsig --no-act -D --debug --status-fd \ --no-debsig --no-act -D --debug --status-fd \
-b --build -I --info -f --field -c --contents \ -b --build -I --info -f --field -c --contents \
-x --extract -X --vextract --fsys-tarfile -e --control \ -x --extract -X --vextract --fsys-tarfile -e --control \
--ignore-depends --abort-after' -- $cur ) ) --ignore-depends --abort-after' -- "$cur" ) )
;; ;;
esac esac
@ -115,11 +115,11 @@ _dpkg_reconfigure()
opt=( $( echo /usr/share/perl5/Debconf/FrontEnd/* ) ) opt=( $( echo /usr/share/perl5/Debconf/FrontEnd/* ) )
opt=( ${opt[@]##*/} ) opt=( ${opt[@]##*/} )
opt=( ${opt[@]%.pm} ) opt=( ${opt[@]%.pm} )
COMPREPLY=( $( compgen -W '${opt[@]}' -- $cur ) ) COMPREPLY=( $( compgen -W '${opt[@]}' -- "$cur" ) )
return 0 return 0
;; ;;
-@(p|-priority)) -@(p|-priority))
COMPREPLY=( $( compgen -W 'low medium high critical' -- $cur ) ) COMPREPLY=( $( compgen -W 'low medium high critical' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -127,9 +127,9 @@ _dpkg_reconfigure()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-f --frontend -p --priority -a --all \ COMPREPLY=( $( compgen -W '-f --frontend -p --priority -a --all \
-u --unseen-only -h --help -s --showold \ -u --unseen-only -h --help -s --showold \
--force --terse' -- $cur ) ) --force --terse' -- "$cur" ) )
else else
COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) ) COMPREPLY=( $( _comp_dpkg_installed_packages "$cur" ) )
fi fi
} && } &&
complete -F _dpkg_reconfigure $default dpkg-reconfigure complete -F _dpkg_reconfigure $default dpkg-reconfigure

View File

@ -26,10 +26,10 @@ _dselect()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--admindir --help --version --licence \ COMPREPLY=( $( compgen -W '--admindir --help --version --licence \
--license --expert --debug' -- $cur ) ) --license --expert --debug' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W 'access update select install config \ COMPREPLY=( $( compgen -W 'access update select install config \
remove quit' -- $cur ) ) remove quit' -- "$cur" ) )
fi fi

View File

@ -26,7 +26,7 @@ _arpspoof()
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -t' -- $cur ) ) COMPREPLY=( $( compgen -W '-i -t' -- "$cur" ) )
else else
_known_hosts_real "$cur" _known_hosts_real "$cur"
fi fi
@ -57,7 +57,7 @@ _dnsspoof()
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -f' -- $cur ) ) COMPREPLY=( $( compgen -W '-i -f' -- "$cur" ) )
fi fi
} && } &&
@ -87,7 +87,7 @@ _dsniff()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-c -d -m -n -i -s -f -t \ COMPREPLY=( $( compgen -W '-c -d -m -n -i -s -f -t \
-r -w' -- $cur ) ) -r -w' -- "$cur" ) )
fi fi
} && } &&
@ -112,7 +112,7 @@ _snarf()
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -v' -- $cur ) ) COMPREPLY=( $( compgen -W '-i -v' -- "$cur" ) )
fi fi
} && } &&
@ -138,7 +138,7 @@ _macof()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -s -d -e -x -y -n' -- $cur ) ) COMPREPLY=( $( compgen -W '-i -s -d -e -x -y -n' -- "$cur" ) )
fi fi
} && } &&
@ -155,7 +155,7 @@ _sshmitm()
cur=`_get_cword` cur=`_get_cword`
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d -I -p' -- $cur ) ) COMPREPLY=( $( compgen -W '-d -I -p' -- "$cur" ) )
else else
_known_hosts_real "$cur" _known_hosts_real "$cur"
fi fi
@ -182,7 +182,7 @@ _sshow()
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d -i' -- $cur ) ) COMPREPLY=( $( compgen -W '-d -i' -- "$cur" ) )
fi fi
} && } &&
@ -207,7 +207,7 @@ _tcpkill()
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -1 -2 -3 -4 -5 -6 -7 -8 -9' -- $cur ) ) COMPREPLY=( $( compgen -W '-i -1 -2 -3 -4 -5 -6 -7 -8 -9' -- "$cur" ) )
fi fi
} && } &&
@ -232,7 +232,7 @@ _tcpnice()
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-A -I -M -i' -- $cur ) ) COMPREPLY=( $( compgen -W '-A -I -M -i' -- "$cur" ) )
fi fi
} && } &&
@ -257,7 +257,7 @@ _urlsnarf()
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-n -i -v' -- $cur ) ) COMPREPLY=( $( compgen -W '-n -i -v' -- "$cur" ) )
fi fi
} && } &&
@ -274,7 +274,7 @@ _webmitm()
cur=`_get_cword` cur=`_get_cword`
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d' -- $cur ) ) COMPREPLY=( $( compgen -W '-d' -- "$cur" ) )
else else
_known_hosts_real "$cur" _known_hosts_real "$cur"
fi fi

View File

@ -16,7 +16,7 @@ _find()
case "$prev" in case "$prev" in
-@(max|min)depth) -@(max|min)depth)
COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' -- $cur ) ) COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' -- "$cur" ) )
return 0 return 0
;; ;;
-?(a|c)newer|-fls|-fprint?(0|f)|-?(i)?(l)name|-?(i)wholename) -?(a|c)newer|-fls|-fprint?(0|f)|-?(i)?(l)name|-?(i)wholename)
@ -26,7 +26,7 @@ _find()
-fstype) -fstype)
# this is highly non-portable # this is highly non-portable
[ -e /proc/filesystems ] && [ -e /proc/filesystems ] &&
COMPREPLY=( $( compgen -W "$( cut -d$'\t' -f2 /proc/filesystems )" -- $cur ) ) COMPREPLY=( $( compgen -W "$( cut -d$'\t' -f2 /proc/filesystems )" -- "$cur" ) )
return 0 return 0
;; ;;
-gid) -gid)
@ -40,7 +40,7 @@ _find()
return 0 return 0
;; ;;
-?(x)type) -?(x)type)
COMPREPLY=( $( compgen -W 'b c d p f l s' -- $cur ) ) COMPREPLY=( $( compgen -W 'b c d p f l s' -- "$cur" ) )
return 0 return 0
;; ;;
-uid) -uid)
@ -48,11 +48,11 @@ _find()
return 0 return 0
;; ;;
-user) -user)
COMPREPLY=( $( compgen -u -- $cur ) ) COMPREPLY=( $( compgen -u -- "$cur" ) )
return 0 return 0
;; ;;
-exec|-ok) -exec|-ok)
COMP_WORDS=(COMP_WORDS[0] $cur) COMP_WORDS=(COMP_WORDS[0] "$cur")
COMP_CWORD=1 COMP_CWORD=1
_command _command
return 0 return 0
@ -86,7 +86,7 @@ _find()
-links -lname -mmin -mtime -name -newer -nouser \ -links -lname -mmin -mtime -name -newer -nouser \
-nogroup -perm -regex -size -true -type -uid -used \ -nogroup -perm -regex -size -true -type -uid -used \
-user -xtype -exec -fls -fprint -fprint0 -fprintf -ok \ -user -xtype -exec -fls -fprint -fprint0 -fprintf -ok \
-print -print0 -printf -prune -ls -wholename -iwholename' -- $cur ) ) -print -print0 -printf -prune -ls -wholename -iwholename' -- "$cur" ) )
# this removes any options from the list of completions that have # this removes any options from the list of completions that have
# already been specified somewhere on the command line, as long as # already been specified somewhere on the command line, as long as

View File

@ -23,7 +23,7 @@ _civserver()
COMPREPLY=( $( compgen -W '-d -f -g -h -i -l -m -M -p -q -r -v\ COMPREPLY=( $( compgen -W '-d -f -g -h -i -l -m -M -p -q -r -v\
--debug --file --gamelog --help --info --log --meta \ --debug --file --gamelog --help --info --log --meta \
--Metaserver --port --quitidle --read --version' \ --Metaserver --port --quitidle --read --version' \
-- $cur ) ) -- "$cur" ) )
fi fi
} && } &&
@ -46,7 +46,7 @@ _civclient()
return 0 return 0
;; ;;
-@(P|-Plugin)) -@(P|-Plugin))
COMPREPLY=( $( compgen -W 'none esd sdl' -- $cur ) ) COMPREPLY=( $( compgen -W 'none esd sdl' -- "$cur" ) )
return 0 return 0
;; ;;
-@(s|-server)) -@(s|-server))
@ -59,7 +59,7 @@ _civclient()
COMPREPLY=( $( compgen -W '-a -d -h -l -m -n -p -P -s -S -t -v\ COMPREPLY=( $( compgen -W '-a -d -h -l -m -n -p -P -s -S -t -v\
--autoconnect --debug --help --log --meta --name \ --autoconnect --debug --help --log --meta --name \
--port --Plugin --server --Sound --tiles --version' \ --port --Plugin --server --Sound --tiles --version' \
-- $cur ) ) -- "$cur" ) )
fi fi
} && } &&

View File

@ -44,7 +44,7 @@ _gcc()
COMPREPLY=( $( compgen -W "$( $cc --help 2>/dev/null | \ COMPREPLY=( $( compgen -W "$( $cc --help 2>/dev/null | \
tr '\t' ' ' | \ tr '\t' ' ' | \
sed -e '/^ *-/!d' -e 's/ *-\([^ ]*\).*/-\1/' | \ sed -e '/^ *-/!d' -e 's/ *-\([^ ]*\).*/-\1/' | \
sort -u )" -- $cur ) ) sort -u )" -- "$cur" ) )
else else
_filedir _filedir
fi fi

View File

@ -16,7 +16,7 @@ _gcl()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-eval -load -f -batch -dir -libdir \ COMPREPLY=( $( compgen -W '-eval -load -f -batch -dir -libdir \
-compile -o-file -c-file -h-file -data-file -system-p '\ -compile -o-file -c-file -h-file -data-file -system-p '\
-- $cur ) ) -- "$cur" ) )
else else
_filedir _filedir
fi fi

View File

@ -19,7 +19,7 @@ _mkisofs()
;; ;;
-*-charset) -*-charset)
COMPREPLY=( $( compgen -W '$( mkisofs -input-charset \ COMPREPLY=( $( compgen -W '$( mkisofs -input-charset \
help 2>&1 | tail -n +3 )' -- $cur ) ) help 2>&1 | tail -n +3 )' -- "$cur" ) )
return 0 return 0
;; ;;
-uid) -uid)
@ -65,7 +65,7 @@ _mkisofs()
-hfs-unlock -hfs-bless -hfs-parms --cap \ -hfs-unlock -hfs-bless -hfs-parms --cap \
--netatalk --double --ethershare --ushare \ --netatalk --double --ethershare --ushare \
--exchange --sgi --xinet --macbin --single \ --exchange --sgi --xinet --macbin --single \
--dave --sfm --osx-double --osx-hfs' -- $cur )) --dave --sfm --osx-double --osx-hfs' -- "$cur" ))
else else
_filedir _filedir
fi fi

View File

@ -14,29 +14,29 @@ _getent()
case $prev in case $prev in
passwd) passwd)
COMPREPLY=( $( compgen -u $cur ) ) COMPREPLY=( $( compgen -u "$cur" ) )
return 0 return 0
;; ;;
group) group)
COMPREPLY=( $( compgen -g $cur ) ) COMPREPLY=( $( compgen -g "$cur" ) )
return 0 return 0
;; ;;
services) services)
COMPREPLY=( $( compgen -s $cur ) ) COMPREPLY=( $( compgen -s "$cur" ) )
return 0 return 0
;; ;;
hosts) hosts)
COMPREPLY=( $( compgen -A hostname $cur ) ) COMPREPLY=( $( compgen -A hostname "$cur" ) )
return 0 return 0
;; ;;
protocols|networks|ahosts|ahostsv4|ahostsv6|rpc) protocols|networks|ahosts|ahostsv4|ahostsv6|rpc)
COMPREPLY=( $( getent $prev | \ COMPREPLY=( $( getent "$prev" | \
sed -ne 's|^\('$cur'[^[:space:]]*\).*|\1|p' ) ) sed -ne 's|^\('"$cur"'[^[:space:]]*\).*|\1|p' ) )
return 0 return 0
;; ;;
aliases|shadow) aliases|shadow)
COMPREPLY=( $( getent $prev | \ COMPREPLY=( $( getent "$prev" | \
sed -ne 's|^\('$cur'[^:]*\).*|\1|p' ) ) sed -ne 's|^\('"$cur"'[^:]*\).*|\1|p' ) )
return 0 return 0
;; ;;
esac esac
@ -46,7 +46,7 @@ _getent()
COMPREPLY=( $( compgen -W 'passwd group hosts services \ COMPREPLY=( $( compgen -W 'passwd group hosts services \
protocols networks ahosts ahostsv4 \ protocols networks ahosts ahostsv4 \
ahostsv6 aliases ethers netgroup \ ahostsv6 aliases ethers netgroup \
rpc shadow' -- $cur ) ) rpc shadow' -- "$cur" ) )
fi fi
} && } &&
complete -F _getent getent complete -F _getent getent

View File

@ -31,7 +31,7 @@ _gkrellm()
COMPREPLY=( $( compgen -W '--help -t --theme -s --server \ COMPREPLY=( $( compgen -W '--help -t --theme -s --server \
-g --geometry -wm -w --withdrawn -c --config -nc \ -g --geometry -wm -w --withdrawn -c --config -nc \
-f --force-host-config -demo -p --plugin -P \ -f --force-host-config -demo -p --plugin -P \
--port' -- $cur ) ) --port' -- "$cur" ) )
fi fi
} && } &&

View File

@ -23,7 +23,7 @@ _gnatmake()
-gnatO -gnatp -gnatP -gnatq -gnatR -gnats \ -gnatO -gnatp -gnatP -gnatq -gnatR -gnats \
-gnatt -gnatT -gnatu -gnatU -gnatv -gnatws \ -gnatt -gnatT -gnatu -gnatU -gnatv -gnatws \
-gnatwe -gnatwl -gnatwu -gnatW -gnatx -gnatX \ -gnatwe -gnatwl -gnatwu -gnatW -gnatx -gnatX \
-gnaty -gnatz -gnatZ -gnat83' -- $cur ) ) -gnaty -gnatz -gnatZ -gnat83' -- "$cur" ) )
else else
# source file completion # source file completion
_filedir '@(adb|ads)' _filedir '@(adb|ads)'

View File

@ -33,7 +33,7 @@ _gpg()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-s -b -e -f -c -d -a -r -u -Z -o -v\ COMPREPLY=( $( compgen -W '-s -b -e -f -c -d -a -r -u -Z -o -v\
-q -n -N $(gpg --dump-options)' -- $cur ) ) -q -n -N $(gpg --dump-options)' -- "$cur" ) )
fi fi
} && } &&

View File

@ -37,7 +37,7 @@ _gpg2 ()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-s -b -e -c -d -k -K -a -r -u -z -o -v \ COMPREPLY=( $( compgen -W '-s -b -e -c -d -k -K -a -r -u -z -o -v \
-n -N -i -h -R -t $(gpg2 --dump-options)' -- $cur ) ) -n -N -i -h -R -t $(gpg2 --dump-options)' -- "$cur" ) )
fi fi
} && } &&
complete -F _gpg2 $default gpg2 complete -F _gpg2 $default gpg2

View File

@ -38,7 +38,7 @@ _gzip()
_expand || return 0 _expand || return 0
COMPREPLY=( $( compgen -f -X "$xspec" -- $cur ) \ COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
$( compgen -d -- $cur ) ) $( compgen -d -- "$cur" ) )
} && } &&
complete -F _gzip $filenames gzip complete -F _gzip $filenames gzip

View File

@ -8,14 +8,14 @@ _heimdal_principals()
{ {
COMPREPLY=( $( compgen -W "$( kadmin -l dump 2>/dev/null | \ COMPREPLY=( $( compgen -W "$( kadmin -l dump 2>/dev/null | \
awk '{print $1}' )" -- $cur ) ) awk '{print $1}' )" -- "$cur" ) )
} }
_heimdal_realms() _heimdal_realms()
{ {
COMPREPLY=( $( compgen -W "( kadmin -l dump 2>/dev/null | \ COMPREPLY=( $( compgen -W "( kadmin -l dump 2>/dev/null | \
awk '{print $1}' | awk -F @ '{print $2}' )" -- $cur ) ) awk '{print $1}' | awk -F @ '{print $2}' )" -- "$cur" ) )
} }
_heimdal_encodings() _heimdal_encodings()
@ -23,7 +23,7 @@ _heimdal_encodings()
COMPREPLY=( $( compgen -W 'des-cbc-mcrc des-cbc-md4 des-cbc-md5 \ COMPREPLY=( $( compgen -W 'des-cbc-mcrc des-cbc-md4 des-cbc-md5 \
des3-cbc-sha1 arcfour-hmac-md5 aes128-cts-hmac-sha1-96 \ des3-cbc-sha1 arcfour-hmac-md5 aes128-cts-hmac-sha1-96 \
aes256-cts-hmac-sha1-96' -- $cur ) ) aes256-cts-hmac-sha1-96' -- "$cur" ) )
} }
@ -112,7 +112,7 @@ _ktutil()
-v --help' -v --help'
;; ;;
esac esac
COMPREPLY=( $( compgen -W "$options" -- $cur ) ) COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
else else
case $command in case $command in
copy) copy)
@ -125,7 +125,7 @@ _ktutil()
_heimdal_principals _heimdal_principals
;; ;;
*) *)
COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
;; ;;
esac esac
fi fi

View File

@ -12,95 +12,95 @@ _ImageMagick()
case "$prev" in case "$prev" in
-channel) -channel)
COMPREPLY=( $( compgen -W 'Red Green Blue Opacity \ COMPREPLY=( $( compgen -W 'Red Green Blue Opacity \
Matte Cyan Magenta Yellow Black' -- $cur ) ) Matte Cyan Magenta Yellow Black' -- "$cur" ) )
return 0 return 0
;; ;;
-colormap) -colormap)
COMPREPLY=( $( compgen -W 'shared private' -- $cur ) ) COMPREPLY=( $( compgen -W 'shared private' -- "$cur" ) )
return 0 return 0
;; ;;
-colorspace) -colorspace)
COMPREPLY=( $( compgen -W 'GRAY OHTA RGB Transparent \ COMPREPLY=( $( compgen -W 'GRAY OHTA RGB Transparent \
XYZ YCbCr YIQ YPbPr YUV CMYK' -- $cur ) ) XYZ YCbCr YIQ YPbPr YUV CMYK' -- "$cur" ) )
return 0 return 0
;; ;;
-compose) -compose)
COMPREPLY=( $( compgen -W 'Over In Out Atop Xor Plus \ COMPREPLY=( $( compgen -W 'Over In Out Atop Xor Plus \
Minus Add Subtract Difference Multiply Bumpmap\ Minus Add Subtract Difference Multiply Bumpmap\
Copy CopyRed CopyGreen CopyBlue CopyOpacity' \ Copy CopyRed CopyGreen CopyBlue CopyOpacity' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-compress) -compress)
COMPREPLY=( $( compgen -W 'None BZip Fax Group4 JPEG \ COMPREPLY=( $( compgen -W 'None BZip Fax Group4 JPEG \
Lossless LZW RLE Zip' -- $cur ) ) Lossless LZW RLE Zip' -- "$cur" ) )
return 0 return 0
;; ;;
-dispose) -dispose)
COMPREPLY=( $( compgen -W 'Undefined None Background \ COMPREPLY=( $( compgen -W 'Undefined None Background \
Previous' -- $cur ) ) Previous' -- "$cur" ) )
return 0 return 0
;; ;;
-encoding) -encoding)
COMPREPLY=( $( compgen -W 'AdobeCustom AdobeExpert \ COMPREPLY=( $( compgen -W 'AdobeCustom AdobeExpert \
AdobeStandard AppleRoman BIG5 GB2312 Latin2 \ AdobeStandard AppleRoman BIG5 GB2312 Latin2 \
None SJIScode Symbol Unicode Wansung' -- $cur)) None SJIScode Symbol Unicode Wansung' -- "$cur"))
return 0 return 0
;; ;;
-endian) -endian)
COMPREPLY=( $( compgen -W 'MSB LSB' -- $cur ) ) COMPREPLY=( $( compgen -W 'MSB LSB' -- "$cur" ) )
return 0 return 0
;; ;;
-filter) -filter)
COMPREPLY=( $( compgen -W 'Point Box Triangle Hermite \ COMPREPLY=( $( compgen -W 'Point Box Triangle Hermite \
Hanning Hamming Blackman Gaussian Quadratic \ Hanning Hamming Blackman Gaussian Quadratic \
Cubic Catrom Mitchell Lanczos Bessel Sinc' \ Cubic Catrom Mitchell Lanczos Bessel Sinc' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-format) -format)
COMPREPLY=( $( compgen -W "$( convert -list format | \ COMPREPLY=( $( compgen -W "$( convert -list format | \
awk '/ [r-][w-][+-] / {print $1}' | \ awk '/ [r-][w-][+-] / {print $1}' | \
tr -d '*' | tr [:upper:] [:lower:] )" \ tr -d '*' | tr [:upper:] [:lower:] )" \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-gravity) -gravity)
COMPREPLY=( $( compgen -W 'Northwest North NorthEast \ COMPREPLY=( $( compgen -W 'Northwest North NorthEast \
West Center East SouthWest South SouthEast' \ West Center East SouthWest South SouthEast' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-intent) -intent)
COMPREPLY=( $( compgen -W 'Absolute Perceptual \ COMPREPLY=( $( compgen -W 'Absolute Perceptual \
Relative Saturation' -- $cur ) ) Relative Saturation' -- "$cur" ) )
return 0 return 0
;; ;;
-interlace) -interlace)
COMPREPLY=( $( compgen -W 'None Line Plane Partition' \ COMPREPLY=( $( compgen -W 'None Line Plane Partition' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-limit) -limit)
COMPREPLY=( $( compgen -W 'Disk File Map Memory' \ COMPREPLY=( $( compgen -W 'Disk File Map Memory' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-list) -list)
COMPREPLY=( $( compgen -W 'Delegate Format Magic \ COMPREPLY=( $( compgen -W 'Delegate Format Magic \
Module Resource Type' -- $cur ) ) Module Resource Type' -- "$cur" ) )
return 0 return 0
;; ;;
-map) -map)
COMPREPLY=( $( compgen -W 'best default gray red \ COMPREPLY=( $( compgen -W 'best default gray red \
green blue' -- $cur ) ) green blue' -- "$cur" ) )
_filedir _filedir
return 0 return 0
;; ;;
-noise) -noise)
COMPREPLY=( $( compgen -W 'Uniform Gaussian \ COMPREPLY=( $( compgen -W 'Uniform Gaussian \
Multiplicative \ Multiplicative \
Impulse Laplacian Poisson' -- $cur ) ) Impulse Laplacian Poisson' -- "$cur" ) )
return 0 return 0
;; ;;
-preview) -preview)
@ -111,7 +111,7 @@ _ImageMagick()
Treshold EdgeDetect Spread Shade \ Treshold EdgeDetect Spread Shade \
Raise Segment Solarize Swirl Implode \ Raise Segment Solarize Swirl Implode \
Wave OilPaint CharcoalDrawing JPEG' \ Wave OilPaint CharcoalDrawing JPEG' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-@(mask|profile|texture|tile|write)) -@(mask|profile|texture|tile|write))
@ -122,23 +122,23 @@ _ImageMagick()
COMPREPLY=( $( compgen -W 'Bilevel Grayscale Palette \ COMPREPLY=( $( compgen -W 'Bilevel Grayscale Palette \
PaletteMatte TrueColor TrueColorMatte \ PaletteMatte TrueColor TrueColorMatte \
ColorSeparation ColorSeparationlMatte \ ColorSeparation ColorSeparationlMatte \
Optimize' -- $cur ) ) Optimize' -- "$cur" ) )
return 0 return 0
;; ;;
-units) -units)
COMPREPLY=( $( compgen -W 'Undefined PixelsPerInch \ COMPREPLY=( $( compgen -W 'Undefined PixelsPerInch \
PixelsPerCentimeter' -- $cur ) ) PixelsPerCentimeter' -- "$cur" ) )
return 0 return 0
;; ;;
-virtual-pixel) -virtual-pixel)
COMPREPLY=( $( compgen -W 'Constant Edge mirror tile' \ COMPREPLY=( $( compgen -W 'Constant Edge mirror tile' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-visual) -visual)
COMPREPLY=( $( compgen -W 'StaticGray GrayScale \ COMPREPLY=( $( compgen -W 'StaticGray GrayScale \
StaticColor PseudoColor TrueColor \ StaticColor PseudoColor TrueColor \
DirectColor defaut visualid' -- $cur )) DirectColor defaut visualid' -- "$cur" ))
return 0 return 0
;; ;;
esac esac
@ -193,12 +193,12 @@ _convert()
-undercolor -unique-colors -units -unsharp -verbose \ -undercolor -unique-colors -units -unsharp -verbose \
-version -view -vignette -virtual-pixel -wave \ -version -view -vignette -virtual-pixel -wave \
-weight -white-point -white-threshold \ -weight -white-point -white-threshold \
-write' -- $cur ) ) -write' -- "$cur" ) )
elif [[ "$cur" == +* ]]; then elif [[ "$cur" == +* ]]; then
COMPREPLY=( $( compgen -W '+adjoin +append +compress \ COMPREPLY=( $( compgen -W '+adjoin +append +compress \
+contrast +debug +dither +endian +gamma +label +map \ +contrast +debug +dither +endian +gamma +label +map \
+mask +matte +negate +noise +page +raise +render \ +mask +matte +negate +noise +page +raise +render \
+write' -- $cur ) ) +write' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -250,11 +250,11 @@ _mogrify()
-transverse -treedepth -trim -type -undercolor \ -transverse -treedepth -trim -type -undercolor \
-unique-colors -units -unsharp -verbose -version \ -unique-colors -units -unsharp -verbose -version \
-view -vignette -virtual-pixel -wave -weight \ -view -vignette -virtual-pixel -wave -weight \
-white-point -white-threshold' -- $cur ) ) -white-point -white-threshold' -- "$cur" ) )
elif [[ "$cur" == +* ]]; then elif [[ "$cur" == +* ]]; then
COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \ COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \
+endian +gamma +label +map +mask +matte +negate +page \ +endian +gamma +label +map +mask +matte +negate +page \
+raise' -- $cur ) ) +raise' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -290,11 +290,11 @@ _display()
-shared-memory -sharpen -size -strip -texture -title \ -shared-memory -sharpen -size -strip -texture -title \
-transparent-color -treedepth -trim -update \ -transparent-color -treedepth -trim -update \
-usePixmap -verbose -version -virtual-pixel -visual \ -usePixmap -verbose -version -virtual-pixel -visual \
-window -window-group -write' -- $cur ) ) -window -window-group -write' -- "$cur" ) )
elif [[ "$cur" == +* ]]; then elif [[ "$cur" == +* ]]; then
COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \ COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \
+endian +gamma +label +map +matte +negate +page \ +endian +gamma +label +map +matte +negate +page \
+raise +write' -- $cur ) ) +raise +write' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -325,9 +325,9 @@ _animate()
-sampling-factor -scenes -seed -set -shared-memory \ -sampling-factor -scenes -seed -set -shared-memory \
-size -strip -title -transparent-color -treedepth \ -size -strip -title -transparent-color -treedepth \
-trim -verbose -version -virtual-pixel -visual \ -trim -verbose -version -virtual-pixel -visual \
-window' -- $cur ) ) -window' -- "$cur" ) )
elif [[ "$cur" == +* ]]; then elif [[ "$cur" == +* ]]; then
COMPREPLY=( $( compgen -W '+debug +dither +gamma +map +matte' -- $cur ) ) COMPREPLY=( $( compgen -W '+debug +dither +gamma +map +matte' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -350,9 +350,9 @@ _identify()
-interpolate -limit -list -log -monitor -ping -quiet \ -interpolate -limit -list -log -monitor -ping -quiet \
-regard-warnings -respect-parenthesis \ -regard-warnings -respect-parenthesis \
-sampling-factor -seed -set -size -strip -units \ -sampling-factor -seed -set -size -strip -units \
-verbose -version -virtual-pixel' -- $cur ) ) -verbose -version -virtual-pixel' -- "$cur" ) )
elif [[ "$cur" == +* ]]; then elif [[ "$cur" == +* ]]; then
COMPREPLY=( $( compgen -W '+debug' -- $cur ) ) COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -387,10 +387,10 @@ _montage()
-thumbnail -tile -title -transform -transparent \ -thumbnail -tile -title -transform -transparent \
-transparent-color -treedepth -trim -type -units \ -transparent-color -treedepth -trim -type -units \
-verbose -version -virtual-pixel \ -verbose -version -virtual-pixel \
-white-point' -- $cur ) ) -white-point' -- "$cur" ) )
elif [[ "$cur" == +* ]]; then elif [[ "$cur" == +* ]]; then
COMPREPLY=( $( compgen -W '+adjoin +compress +debug +dither \ COMPREPLY=( $( compgen -W '+adjoin +compress +debug +dither \
+endian +gamma +label +matte +page' -- $cur ) ) +endian +gamma +label +matte +page' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -422,10 +422,10 @@ _composite()
-stegano -stereo -strip -swap -thumbnail -tile \ -stegano -stereo -strip -swap -thumbnail -tile \
-transform -transparent-color -treedepth -type -units \ -transform -transparent-color -treedepth -type -units \
-unsharp -verbose -version -virtual-pixel -watermark \ -unsharp -verbose -version -virtual-pixel -watermark \
-white-point -write' -- $cur ) ) -white-point -write' -- "$cur" ) )
elif [[ "$cur" == +* ]]; then elif [[ "$cur" == +* ]]; then
COMPREPLY=( $( compgen -W '+compress +debug +dither +endian +label \ COMPREPLY=( $( compgen -W '+compress +debug +dither +endian +label \
+matte +negate +page +write' -- $cur ) ) +matte +negate +page +write' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -450,9 +450,9 @@ _compare()
-quality -quantize -quiet -regard-warnings \ -quality -quantize -quiet -regard-warnings \
-respect-parenthesis -sampling-factor -seed -set \ -respect-parenthesis -sampling-factor -seed -set \
-size -transparent-color -type -verbose -version \ -size -transparent-color -type -verbose -version \
-virtual-pixel' -- $cur ) ) -virtual-pixel' -- "$cur" ) )
elif [[ "$cur" == +* ]]; then elif [[ "$cur" == +* ]]; then
COMPREPLY=( $( compgen -W '+debug' -- $cur ) ) COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -471,9 +471,9 @@ _conjure()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-debug -help -list -log -monitor \ COMPREPLY=( $( compgen -W '-debug -help -list -log -monitor \
-quiet -regard-warnings -seed -verbose \ -quiet -regard-warnings -seed -verbose \
-version' -- $cur ) ) -version' -- "$cur" ) )
elif [[ "$cur" == +* ]]; then elif [[ "$cur" == +* ]]; then
COMPREPLY=( $( compgen -W '+debug' -- $cur ) ) COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -502,9 +502,9 @@ _import()
-scene -screen -seed -set -silent -snaps -strip \ -scene -screen -seed -set -silent -snaps -strip \
-thumbnail -transparent -transparent-color -treedepth \ -thumbnail -transparent -transparent-color -treedepth \
-trim -type -verbose -version -virtual-pixel \ -trim -type -verbose -version -virtual-pixel \
-window' -- $cur ) ) -window' -- "$cur" ) )
elif [[ "$cur" == +* ]]; then elif [[ "$cur" == +* ]]; then
COMPREPLY=( $( compgen -W '+debug' -- $cur ) ) COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -527,9 +527,9 @@ _stream()
-log -map -monitor -quantize -quiet -regard-warnings \ -log -map -monitor -quantize -quiet -regard-warnings \
-respect-parenthesis -sampling-factor -seed -set \ -respect-parenthesis -sampling-factor -seed -set \
-size -storage-type -transparent-color -verbose \ -size -storage-type -transparent-color -verbose \
-version -virtual-pixel' -- $cur ) ) -version -virtual-pixel' -- "$cur" ) )
elif [[ "$cur" == +* ]]; then elif [[ "$cur" == +* ]]; then
COMPREPLY=( $( compgen -W '+debug' -- $cur ) ) COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
else else
_filedir _filedir
fi fi

View File

@ -15,7 +15,7 @@ _ipmitool()
case "$prev" in case "$prev" in
-I) -I)
COMPREPLY=( $( compgen -W 'open imb lan lanplus free' \ COMPREPLY=( $( compgen -W 'open imb lan lanplus free' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -24,12 +24,12 @@ _ipmitool()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h -V -v -c -d -I -H -p -U -f -S -a \ COMPREPLY=( $( compgen -W '-h -V -v -c -d -I -H -p -U -f -S -a \
-e -C -k -y -K -A -P -E -K -m -b -r -B -T -l -o -O' \ -e -C -k -y -K -A -P -E -K -m -b -r -B -T -l -o -O' \
-- $cur ) ) -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W 'raw i2c spd lan chassis power event \ COMPREPLY=( $( compgen -W 'raw i2c spd lan chassis power event \
mc sdr sensor fru gendev sel pef sol tsol isol user \ mc sdr sensor fru gendev sel pef sol tsol isol user \
channel session sunoem kontronoem picmg fwum firewall \ channel session sunoem kontronoem picmg fwum firewall \
exec set hpm ekanalyzer' -- $cur ) ) exec set hpm ekanalyzer' -- "$cur" ) )
fi fi
} && } &&

View File

@ -26,27 +26,27 @@ _iptables()
case "$prev" in case "$prev" in
-*[AIDRPFXLZ]) -*[AIDRPFXLZ])
COMPREPLY=( $( compgen -W '`iptables $table -nL | \ COMPREPLY=( $( compgen -W '`iptables $table -nL | \
sed -ne "s/^Chain \([^ ]\+\).*$/\1/p"`' -- $cur ) ) sed -ne "s/^Chain \([^ ]\+\).*$/\1/p"`' -- "$cur" ) )
;; ;;
-*t) -*t)
COMPREPLY=( $( compgen -W 'nat filter mangle' -- $cur ) ) COMPREPLY=( $( compgen -W 'nat filter mangle' -- "$cur" ) )
;; ;;
-j) -j)
if [ "$table" = "-t filter" -o "$table" = "" ]; then if [ "$table" = "-t filter" -o "$table" = "" ]; then
COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \ COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \
`iptables $table -nL | sed -ne "$chain" \ `iptables $table -nL | sed -ne "$chain" \
-e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`' -- \ -e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`' -- \
$cur ) ) "$cur" ) )
elif [ "$table" = "-t nat" ]; then elif [ "$table" = "-t nat" ]; then
COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \ COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \
MIRROR SNAT DNAT MASQUERADE `iptables $table -nL | \ MIRROR SNAT DNAT MASQUERADE `iptables $table -nL | \
sed -ne "$chain" -e "s/OUTPUT|PREROUTING|POSTROUTING//"`' \ sed -ne "$chain" -e "s/OUTPUT|PREROUTING|POSTROUTING//"`' \
-- $cur ) ) -- "$cur" ) )
elif [ "$table" = "-t mangle" ]; then elif [ "$table" = "-t mangle" ]; then
COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \ COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \
MARK TOS `iptables $table -nL | sed -ne "$chain" \ MARK TOS `iptables $table -nL | sed -ne "$chain" \
-e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`' -- \ -e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`' -- \
$cur ) ) "$cur" ) )
fi fi
;; ;;
*) *)

View File

@ -9,6 +9,6 @@ _isql()
local cur local cur
cur=`_get_cword` cur=`_get_cword`
[ -f "$ODBCINI" ] && COMPREPLY=( $( grep \\[$cur "$ODBCINI" | tr -d \\[\\] ) ) [ -f "$ODBCINI" ] && COMPREPLY=( $( grep \\["$cur" "$ODBCINI" | tr -d \\[\\] ) )
} && } &&
complete -F _isql isql complete -F _isql isql

View File

@ -12,7 +12,7 @@ _jar()
cur=`_get_cword` cur=`_get_cword`
if [ $COMP_CWORD = 1 ]; then if [ $COMP_CWORD = 1 ]; then
COMPREPLY=( $( compgen -W 'c t x u' -- $cur ) ) COMPREPLY=( $( compgen -W 'c t x u' -- "$cur" ) )
return 0 return 0
fi fi

View File

@ -159,7 +159,7 @@ _java()
-showversion -? -help -X -jar \ -showversion -? -help -X -jar \
-ea -enableassertions -da -disableassertions \ -ea -enableassertions -da -disableassertions \
-esa -enablesystemassertions \ -esa -enablesystemassertions \
-dsa -disablesystemassertions ' -- $cur ) ) -dsa -disablesystemassertions ' -- "$cur" ) )
else else
if [[ "$prev" == -jar ]]; then if [[ "$prev" == -jar ]]; then
# jar file completion # jar file completion
@ -212,7 +212,7 @@ _javadoc()
-nohelp -nonavbar -quiet -serialwarn -tag \ -nohelp -nonavbar -quiet -serialwarn -tag \
-taglet -tagletpath -charset -helpfile \ -taglet -tagletpath -charset -helpfile \
-linksource -stylesheetfile -docencoding' -- \ -linksource -stylesheetfile -docencoding' -- \
$cur ) ) "$cur" ) )
else else
# source files completion # source files completion
_filedir java _filedir java
@ -247,7 +247,7 @@ _javac()
COMPREPLY=( $( compgen -W '-g -g:none -g:lines -g:vars\ COMPREPLY=( $( compgen -W '-g -g:none -g:lines -g:vars\
-g:source -O -nowarn -verbose -deprecation -classpath\ -g:source -O -nowarn -verbose -deprecation -classpath\
-sourcepath -bootclasspath -extdirs -d -encoding -source\ -sourcepath -bootclasspath -extdirs -d -encoding -source\
-target -help' -- $cur ) ) -target -help' -- "$cur" ) )
else else
# source files completion # source files completion
_filedir java _filedir java

View File

@ -14,7 +14,7 @@ _kldload()
[ -d $moddir ] || moddir=/boot/kernel/ [ -d $moddir ] || moddir=/boot/kernel/
cur=`_get_cword` cur=`_get_cword`
COMPREPLY=( $( compgen -f $moddir$cur ) ) COMPREPLY=( $( compgen -f "$moddir$cur" ) )
COMPREPLY=( ${COMPREPLY[@]#$moddir} ) COMPREPLY=( ${COMPREPLY[@]#$moddir} )
COMPREPLY=( ${COMPREPLY[@]%.ko} ) COMPREPLY=( ${COMPREPLY[@]%.ko} )

View File

@ -32,7 +32,7 @@ library-archives library-categories library-branches library-versions \
library-revisions library-log library-file touched-files-prereqs \ library-revisions library-log library-file touched-files-prereqs \
patch-set-web update-distributions distribution-name notify my-notifier \ patch-set-web update-distributions distribution-name notify my-notifier \
mail-new-categories mail-new-branches mail-new-versions mail-new-revisions \ mail-new-categories mail-new-branches mail-new-versions mail-new-revisions \
notify-library notify-browser push-new-revisions sendmail-mailx' $cur )) notify-library notify-browser push-new-revisions sendmail-mailx' "$cur" ))
fi fi
return 0 return 0

View File

@ -19,11 +19,11 @@ _ldapvi()
;; ;;
-@(Y|-sasl-mech)) -@(Y|-sasl-mech))
COMPREPLY=( $( compgen -W 'EXTERNAL GSSAPI DIGEST-MD5 \ COMPREPLY=( $( compgen -W 'EXTERNAL GSSAPI DIGEST-MD5 \
CRAM-MD5 PLAIN ANONYMOUS' -- $cur ) ) CRAM-MD5 PLAIN ANONYMOUS' -- "$cur" ) )
return 0 return 0
;; ;;
--bind) --bind)
COMPREPLY=( $( compgen -W 'simple sasl' -- $cur ) ) COMPREPLY=( $( compgen -W 'simple sasl' -- "$cur" ) )
return 0 return 0
;; ;;
--bind-dialog) --bind-dialog)
@ -32,22 +32,22 @@ _ldapvi()
return 0 return 0
;; ;;
--scope) --scope)
COMPREPLY=( $( compgen -W 'base one sub' -- $cur ) ) COMPREPLY=( $( compgen -W 'base one sub' -- "$cur" ) )
return 0 return 0
;; ;;
--deref) --deref)
COMPREPLY=( $( compgen -W 'never searching finding \ COMPREPLY=( $( compgen -W 'never searching finding \
always' -- $cur ) ) always' -- "$cur" ) )
return 0 return 0
;; ;;
--encoding) --encoding)
COMPREPLY=( $( compgen -W 'ASCII UTF-8 binary' \ COMPREPLY=( $( compgen -W 'ASCII UTF-8 binary' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
--tls) --tls)
COMPREPLY=( $( compgen -W 'never allow try strict' \ COMPREPLY=( $( compgen -W 'never allow try strict' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -64,7 +64,7 @@ _ldapvi()
--managedsait --noquestions -! --noninteractive -q \ --managedsait --noquestions -! --noninteractive -q \
--quiet -R --read -Z --starttls --tls -v --verbose \ --quiet -R --read -Z --starttls --tls -v --verbose \
--ldapsearch --ldapmodify --ldapdelete --ldapmoddn' \ --ldapsearch --ldapmodify --ldapdelete --ldapmoddn' \
-- $cur ) ) -- "$cur" ) )
fi fi
} && } &&
complete -F _ldapvi ldapvi complete -F _ldapvi ldapvi

View File

@ -13,7 +13,7 @@ _lftp()
if [ $COMP_CWORD -eq 1 ] && [ -f ~/.lftp/bookmarks ]; then if [ $COMP_CWORD -eq 1 ] && [ -f ~/.lftp/bookmarks ]; then
COMPREPLY=( $( compgen -W '$( sed -ne "s/^\(.*\)'$'\t''.*$/\1/p" \ COMPREPLY=( $( compgen -W '$( sed -ne "s/^\(.*\)'$'\t''.*$/\1/p" \
~/.lftp/bookmarks )' -- $cur ) ) ~/.lftp/bookmarks )' -- "$cur" ) )
fi fi
return 0 return 0

View File

@ -7,7 +7,7 @@ have lilo && {
_lilo_labels() _lilo_labels()
{ {
COMPREPLY=( $( compgen -W "$( awk -F'=' '/label/ {print $2}' \ COMPREPLY=( $( compgen -W "$( awk -F'=' '/label/ {print $2}' \
/etc/lilo.conf | sed -e 's/\"//g' )" -- $cur ) ) /etc/lilo.conf | sed -e 's/\"//g' )" -- "$cur" ) )
} }
_lilo() _lilo()
@ -41,7 +41,7 @@ _lilo()
-T) -T)
# topic completion # topic completion
COMPREPLY=( $( compgen -W 'help ChRul EBDA geom geom= \ COMPREPLY=( $( compgen -W 'help ChRul EBDA geom geom= \
table= video' -- $cur ) ) table= video' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -50,7 +50,7 @@ _lilo()
# relevant options completion # relevant options completion
COMPREPLY=( $( compgen -W '-A -b -c -C -d -f -g -i -I -l -L -m \ COMPREPLY=( $( compgen -W '-A -b -c -C -d -f -g -i -I -l -L -m \
-M -p -P -q -r -R -s -S -t -T -u -U -v -V -w -x -z' -- \ -M -p -P -q -r -R -s -S -t -T -u -U -v -V -w -x -z' -- \
$cur ) ) "$cur" ) )
fi fi
} }
complete -F _lilo lilo complete -F _lilo lilo

View File

@ -13,7 +13,7 @@ _links()
case "$cur" in case "$cur" in
--*) --*)
COMPREPLY=( $( compgen -W '--help' -- $cur ) ) COMPREPLY=( $( compgen -W '--help' -- "$cur" ) )
;; ;;
-*) -*)
COMPREPLY=( $( compgen -W '-async-dns -max-connections \ COMPREPLY=( $( compgen -W '-async-dns -max-connections \
@ -22,12 +22,12 @@ _links()
-format-cache-size -memory-cache-size \ -format-cache-size -memory-cache-size \
-http-proxy -ftp-proxy -download-dir \ -http-proxy -ftp-proxy -download-dir \
-assume-codepage -anonymous -dump -no-connect \ -assume-codepage -anonymous -dump -no-connect \
-source -version -help' -- $cur ) ) -source -version -help' -- "$cur" ) )
;; ;;
*) *)
if [ -r ~/.links/links.his ]; then if [ -r ~/.links/links.his ]; then
COMPREPLY=( $( compgen -W '$( < ~/.links/links.his )' \ COMPREPLY=( $( compgen -W '$( < ~/.links/links.his )' \
-- $cur ) ) -- "$cur" ) )
fi fi
_filedir '@(htm|html)' _filedir '@(htm|html)'
return 0 return 0

View File

@ -17,7 +17,7 @@ _lisp()
COMPREPLY=( $( compgen -W '-core -lib -batch -quit -edit -eval -init \ COMPREPLY=( $( compgen -W '-core -lib -batch -quit -edit -eval -init \
-dynamic-space-size -hinit -noinit -nositeinit -load \ -dynamic-space-size -hinit -noinit -nositeinit -load \
-slave ' \ -slave ' \
-- $cur ) ) -- "$cur" ) )
else else
_filedir _filedir
fi fi

View File

@ -7,29 +7,29 @@ have lvm && {
_volumegroups() _volumegroups()
{ {
COMPREPLY=( $(compgen -W "$( vgscan 2>/dev/null | \ COMPREPLY=( $(compgen -W "$( vgscan 2>/dev/null | \
sed -n -e 's|.*Found.*"\(.*\)".*$|\1|p' )" -- $cur ) ) sed -n -e 's|.*Found.*"\(.*\)".*$|\1|p' )" -- "$cur" ) )
} }
_physicalvolumes() _physicalvolumes()
{ {
COMPREPLY=( $(compgen -W "$( pvscan 2>/dev/null | \ COMPREPLY=( $(compgen -W "$( pvscan 2>/dev/null | \
sed -n -e 's|^.*PV \(.*\) VG.*$|\1|p' )" -- $cur ) ) sed -n -e 's|^.*PV \(.*\) VG.*$|\1|p' )" -- "$cur" ) )
} }
_logicalvolumes() _logicalvolumes()
{ {
COMPREPLY=( $(compgen -W "$( lvscan 2>/dev/null | \ COMPREPLY=( $(compgen -W "$( lvscan 2>/dev/null | \
sed -n -e "s|^.*'\(.*\)'.*$|\1|p" )" -- $cur ) ) sed -n -e "s|^.*'\(.*\)'.*$|\1|p" )" -- "$cur" ) )
} }
_units() _units()
{ {
COMPREPLY=( $( compgen -W 'h s b k m g t H K M G T' -- $cur ) ) COMPREPLY=( $( compgen -W 'h s b k m g t H K M G T' -- "$cur" ) )
} }
_sizes() _sizes()
{ {
COMPREPLY=( $( compgen -W 'k K m M g G t T' -- $cur ) ) COMPREPLY=( $( compgen -W 'k K m M g G t T' -- "$cur" ) )
} }
_args() _args()
@ -56,7 +56,7 @@ _lvmdiskscan()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d --debug -h -? --help -l \ COMPREPLY=( $( compgen -W '-d --debug -h -? --help -l \
--lvmpartition -v --verbose --version' -- $cur ) ) --lvmpartition -v --verbose --version' -- "$cur" ) )
fi fi
} }
complete -F _lvmdiskscan lvmdiskscan complete -F _lvmdiskscan lvmdiskscan
@ -73,7 +73,7 @@ _pvscan()
--exported -n --novolumegroup -h -? \ --exported -n --novolumegroup -h -? \
--help --ignorelockingfailure -P \ --help --ignorelockingfailure -P \
--partial -s --short -u --uuid -v \ --partial -s --short -u --uuid -v \
--verbose --version' -- $cur ) ) --verbose --version' -- "$cur" ) )
fi fi
} }
complete -F _pvscan pvscan complete -F _pvscan pvscan
@ -91,7 +91,7 @@ _pvs()
COMPREPLY=( $( compgen -W 'pv_fmt pv_uuid \ COMPREPLY=( $( compgen -W 'pv_fmt pv_uuid \
pv_size pv_free pv_used pv_name \ pv_size pv_free pv_used pv_name \
pv_attr pv_pe_count \ pv_attr pv_pe_count \
pv_pe_alloc_count' -- $cur ) ) pv_pe_alloc_count' -- "$cur" ) )
return 0 return 0
;; ;;
--units) --units)
@ -105,7 +105,7 @@ _pvs()
-h -? --help --ignorelockingfailure --noheadings \ -h -? --help --ignorelockingfailure --noheadings \
--nosuffix -o --options -O --sort \ --nosuffix -o --options -O --sort \
--separator --unbuffered --units \ --separator --unbuffered --units \
-v --verbose --version' -- $cur ) ) -v --verbose --version' -- "$cur" ) )
else else
_physicalvolumes _physicalvolumes
fi fi
@ -129,7 +129,7 @@ _pvdisplay()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \ COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \
-v --verbose -d --debug -h --help --version' -- $cur ) ) -v --verbose -d --debug -h --help --version' -- "$cur" ) )
else else
_physicalvolumes _physicalvolumes
fi fi
@ -146,7 +146,7 @@ _pvchange()
case "$prev" in case "$prev" in
-@(A|x|-autobackup|--allocatable)) -@(A|x|-autobackup|--allocatable))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -155,7 +155,7 @@ _pvchange()
COMPREPLY=( $( compgen -W '-a --all -A --autobackup \ COMPREPLY=( $( compgen -W '-a --all -A --autobackup \
-d --debug -h --help -t --test -u --uuid -x \ -d --debug -h --help -t --test -u --uuid -x \
--allocatable -v --verbose --addtag --deltag \ --allocatable -v --verbose --addtag --deltag \
--version' -- $cur ) ) --version' -- "$cur" ) )
else else
_physicalvolumes _physicalvolumes
fi fi
@ -176,11 +176,11 @@ _pvcreate()
return 0 return 0
;; ;;
-@(M|-metadatatype)) -@(M|-metadatatype))
COMPREPLY=( $( compgen -W '1 2' -- $cur ) ) COMPREPLY=( $( compgen -W '1 2' -- "$cur" ) )
return 0 return 0
;; ;;
--metadatacopies) --metadatacopies)
COMPREPLY=( $( compgen -W '0 1 2' -- $cur ) ) COMPREPLY=( $( compgen -W '0 1 2' -- "$cur" ) )
return 0 return 0
;; ;;
--@(metadatasize|setphysicalvolumesize)) --@(metadatasize|setphysicalvolumesize))
@ -194,7 +194,7 @@ _pvcreate()
--force -h -? --help --labelsector -M --metadatatype \ --force -h -? --help --labelsector -M --metadatatype \
--metadatacopies --metadatasize \ --metadatacopies --metadatasize \
--setphysicalvolumesize -t --test -u --uuid uuid -v \ --setphysicalvolumesize -t --test -u --uuid uuid -v \
--verbose -y --yes --version' -- $cur ) ) --verbose -y --yes --version' -- "$cur" ) )
else else
_physicalvolumes _physicalvolumes
fi fi
@ -211,7 +211,7 @@ _pvmove()
case "$prev" in case "$prev" in
-@(A|-autobackup)) -@(A|-autobackup))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
-@(n|-name)) -@(n|-name))
@ -223,7 +223,7 @@ _pvmove()
COMPREPLY=( $( compgen -W '--abort -A --autobackup \ COMPREPLY=( $( compgen -W '--abort -A --autobackup \
-b --background -d --debug -f --force -h -? \ -b --background -d --debug -f --force -h -? \
--help -i --interval -t --test -v --verbose \ --help -i --interval -t --test -v --verbose \
--version -n --name' -- $cur ) ) --version -n --name' -- "$cur" ) )
else else
_physicalvolumes _physicalvolumes
fi fi
@ -240,7 +240,7 @@ _pvremove()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d --debug -f --force -h -? \ COMPREPLY=( $( compgen -W '-d --debug -f --force -h -? \
--help -y --yes -t --test -v --verbose \ --help -y --yes -t --test -v --verbose \
--version' -- $cur ) ) --version' -- "$cur" ) )
else else
_physicalvolumes _physicalvolumes
fi fi
@ -257,7 +257,7 @@ _vgscan()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d --debug -h --help \ COMPREPLY=( $( compgen -W '-d --debug -h --help \
--ignorelockingfailure --mknodes -P \ --ignorelockingfailure --mknodes -P \
--partial -v --verbose --version' -- $cur ) ) --partial -v --verbose --version' -- "$cur" ) )
fi fi
} }
complete -F _vgscan vgscan complete -F _vgscan vgscan
@ -276,7 +276,7 @@ _vgs()
vg_attr vg_size vg_free vg_sysid \ vg_attr vg_size vg_free vg_sysid \
vg_extent_size vg_extent_count vg_free_count \ vg_extent_size vg_extent_count vg_free_count \
max_lv max_pv pv_count lv_count snap_count \ max_lv max_pv pv_count lv_count snap_count \
vg_seqno' -- $cur ) ) vg_seqno' -- "$cur" ) )
return 0 return 0
;; ;;
--units) --units)
@ -290,7 +290,7 @@ _vgs()
-h --help --ignorelockingfailure --noheadings \ -h --help --ignorelockingfailure --noheadings \
--nosuffix -o --options -O --sort -P --partial \ --nosuffix -o --options -O --sort -P --partial \
--separator --unbuffered --units \ --separator --unbuffered --units \
-v --verbose --version' -- $cur ) ) -v --verbose --version' -- "$cur" ) )
else else
_volumegroups _volumegroups
fi fi
@ -315,7 +315,7 @@ _vgdisplay()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \ COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \
-P --partial -A --activevolumegroups -v --verbose \ -P --partial -A --activevolumegroups -v --verbose \
-d --debug -h --help --version' -- $cur ) ) -d --debug -h --help --version' -- "$cur" ) )
else else
_volumegroups _volumegroups
fi fi
@ -332,7 +332,7 @@ _vgchange()
case "$prev" in case "$prev" in
-@(a|A|x|-available|-autobackup|-resizeable)) -@(a|A|x|-available|-autobackup|-resizeable))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -342,7 +342,7 @@ _vgchange()
--partial -d --debug -h --help --ignorelockingfailure \ --partial -d --debug -h --help --ignorelockingfailure \
-t --test -u --uuid -v --verbose --version -a \ -t --test -u --uuid -v --verbose --version -a \
--available -x --resizeable -l --logicalvolume \ --available -x --resizeable -l --logicalvolume \
--addtag --deltag' -- $cur ) ) --addtag --deltag' -- "$cur" ) )
else else
_volumegroups _volumegroups
fi fi
@ -359,11 +359,11 @@ _vgcreate()
case "$prev" in case "$prev" in
-@(A|-autobackup)) -@(A|-autobackup))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
-@(M|-metadatatype)) -@(M|-metadatatype))
COMPREPLY=( $( compgen -W '1 2' -- $cur ) ) COMPREPLY=( $( compgen -W '1 2' -- "$cur" ) )
return 0 return 0
;; ;;
-@(s|-physicalextentsize)) -@(s|-physicalextentsize))
@ -377,7 +377,7 @@ _vgcreate()
--alloc -d --debug -h --help -l --maxlogicalvolumes \ --alloc -d --debug -h --help -l --maxlogicalvolumes \
-M --metadatatype -p --maxphysicalvolumes -s \ -M --metadatatype -p --maxphysicalvolumes -s \
--physicalextentsize -t --test -v --verbose \ --physicalextentsize -t --test -v --verbose \
--version' -- $cur ) ) --version' -- "$cur" ) )
else else
_args _args
if [ $args -eq 0 ]; then if [ $args -eq 0 ]; then
@ -398,7 +398,7 @@ _vgremove()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d --debug -h --help -t --test \ COMPREPLY=( $( compgen -W '-d --debug -h --help -t --test \
-v --verbose --version' -- $cur ) ) -v --verbose --version' -- "$cur" ) )
else else
_volumegroups _volumegroups
fi fi
@ -415,14 +415,14 @@ _vgrename()
case "$prev" in case "$prev" in
-@(A|-autobackup)) -@(A|-autobackup))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \
-? --help -t --test -v --verbose --version' -- $cur ) ) -? --help -t --test -v --verbose --version' -- "$cur" ) )
else else
_volumegroups _volumegroups
fi fi
@ -439,7 +439,7 @@ _vgreduce()
case "$prev" in case "$prev" in
-@(A|-autobackup)) -@(A|-autobackup))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -447,7 +447,7 @@ _vgreduce()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-a --all -A --autobackup -d \ COMPREPLY=( $( compgen -W '-a --all -A --autobackup -d \
--debug -h --help --removemissing -t --test -v \ --debug -h --help --removemissing -t --test -v \
--verbose --version' -- $cur ) ) --verbose --version' -- "$cur" ) )
else else
_args _args
@ -470,7 +470,7 @@ _vgextend()
case "$prev" in case "$prev" in
-@(A|-autobackup)) -@(A|-autobackup))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
-@(L|-size)) -@(L|-size))
@ -481,7 +481,7 @@ _vgextend()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \
-? --help -t --test -v --verbose --version' -- $cur ) ) -? --help -t --test -v --verbose --version' -- "$cur" ) )
else else
_args _args
if [ $args -eq 0 ]; then if [ $args -eq 0 ]; then
@ -502,7 +502,7 @@ _vgport()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-a --all -d --debug -h \ COMPREPLY=( $( compgen -W '-a --all -d --debug -h \
-? --help -v --verbose --version' -- $cur ) ) -? --help -v --verbose --version' -- "$cur" ) )
else else
_volumegroups _volumegroups
fi fi
@ -518,7 +518,7 @@ _vgck()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d --debug -h \ COMPREPLY=( $( compgen -W '-d --debug -h \
-? --help -v --verbose --version' -- $cur ) ) -? --help -v --verbose --version' -- "$cur" ) )
else else
_volumegroups _volumegroups
fi fi
@ -535,11 +535,11 @@ _vgconvert()
case "$prev" in case "$prev" in
-@(M|-metadatatype)) -@(M|-metadatatype))
COMPREPLY=( $( compgen -W '1 2' -- $cur ) ) COMPREPLY=( $( compgen -W '1 2' -- "$cur" ) )
return 0 return 0
;; ;;
--metadatacopies) --metadatacopies)
COMPREPLY=( $( compgen -W '0 1 2' -- $cur ) ) COMPREPLY=( $( compgen -W '0 1 2' -- "$cur" ) )
return 0 return 0
;; ;;
--metadatasize) --metadatasize)
@ -551,7 +551,7 @@ _vgconvert()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d --debug -h --help --labelsector \ COMPREPLY=( $( compgen -W '-d --debug -h --help --labelsector \
-M --metadatatype --metadatacopies --metadatasize \ -M --metadatatype --metadatacopies --metadatasize \
-t --test -v --verbose --version' -- $cur ) ) -t --test -v --verbose --version' -- "$cur" ) )
else else
_volumegroups _volumegroups
fi fi
@ -576,7 +576,7 @@ _vgcfgbackup()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d --debug -f --file -h --help \ COMPREPLY=( $( compgen -W '-d --debug -f --file -h --help \
--ignorelockingfailure -P --partial -v --verbose \ --ignorelockingfailure -P --partial -v --verbose \
--version' -- $cur ) ) --version' -- "$cur" ) )
else else
_volumegroups _volumegroups
fi fi
@ -597,7 +597,7 @@ _vgcfgrestore()
return 0 return 0
;; ;;
-@(M|-metadatatype)) -@(M|-metadatatype))
COMPREPLY=( $( compgen -W '1 2' -- $cur ) ) COMPREPLY=( $( compgen -W '1 2' -- "$cur" ) )
return 0 return 0
;; ;;
-@(n|-name)) -@(n|-name))
@ -609,7 +609,7 @@ _vgcfgrestore()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d --debug -f --file -l --list \ COMPREPLY=( $( compgen -W '-d --debug -f --file -l --list \
-h --help -M --Metadatatype -n --name -t --test \ -h --help -M --Metadatatype -n --name -t --test \
-v --verbose --version' -- $cur ) ) -v --verbose --version' -- "$cur" ) )
else else
_volumegroups _volumegroups
fi fi
@ -626,7 +626,7 @@ _vgmerge()
case "$prev" in case "$prev" in
-@(A|-autobackup)) -@(A|-autobackup))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -634,7 +634,7 @@ _vgmerge()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-A --autobackup -d --debug \ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug \
-h --help -l --list -t --test -v --verbose \ -h --help -l --list -t --test -v --verbose \
--version' -- $cur ) ) --version' -- "$cur" ) )
else else
_volumegroups _volumegroups
fi fi
@ -651,11 +651,11 @@ _vgsplit()
case "$prev" in case "$prev" in
-@(A|-autobackup)) -@(A|-autobackup))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
-@(M|-metadatatype)) -@(M|-metadatatype))
COMPREPLY=( $( compgen -W '1 2' -- $cur ) ) COMPREPLY=( $( compgen -W '1 2' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -663,7 +663,7 @@ _vgsplit()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-A --autobackup -d --debug \ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug \
-h --help -l --list -M --metadatatype -t --test \ -h --help -l --list -M --metadatatype -t --test \
-v --verbose --version' -- $cur ) ) -v --verbose --version' -- "$cur" ) )
else else
_args _args
if [ $args -eq 0 -o $args -eq 1 ]; then if [ $args -eq 0 -o $args -eq 1 ]; then
@ -684,7 +684,7 @@ _vgmknodes()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d --debug -h --help -v --verbose \ COMPREPLY=( $( compgen -W '-d --debug -h --help -v --verbose \
--version' -- $cur ) ) --version' -- "$cur" ) )
else else
_volumegroups _volumegroups
fi fi
@ -701,7 +701,7 @@ _lvscan()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-b --blockdevice -d --debug \ COMPREPLY=( $( compgen -W '-b --blockdevice -d --debug \
-h -? --help --ignorelockingfailure -P \ -h -? --help --ignorelockingfailure -P \
--partial -v --verbose --version' -- $cur ) ) --partial -v --verbose --version' -- "$cur" ) )
fi fi
} }
complete -F _lvscan lvscan complete -F _lvscan lvscan
@ -720,7 +720,7 @@ _lvs()
lv_attr lv_minor lv_size seg_count \ lv_attr lv_minor lv_size seg_count \
origin snap_percent segtype stripes \ origin snap_percent segtype stripes \
stripesize chunksize seg_start \ stripesize chunksize seg_start \
seg_size' -- $cur ) ) seg_size' -- "$cur" ) )
return 0 return 0
;; ;;
--units) --units)
@ -734,7 +734,7 @@ _lvs()
-h --help --ignorelockingfailure --noheadings \ -h --help --ignorelockingfailure --noheadings \
--nosuffix -o --options -O --sort -P --partial \ --nosuffix -o --options -O --sort -P --partial \
--segments --separator --unbuffered --units \ --segments --separator --unbuffered --units \
-v --verbose --version' -- $cur ) ) -v --verbose --version' -- "$cur" ) )
else else
_logicalvolumes _logicalvolumes
fi fi
@ -759,7 +759,7 @@ _lvdisplay()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \ COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \
-P --partial -m --maps -v --verbose -d --debug -h \ -P --partial -m --maps -v --verbose -d --debug -h \
--help --version' -- $cur ) ) --help --version' -- "$cur" ) )
else else
_logicalvolumes _logicalvolumes
fi fi
@ -776,11 +776,11 @@ _lvchange()
case "$prev" in case "$prev" in
-@(a|A|C|M|-available|-autobackup|-continguous|-persistent)) -@(a|A|C|M|-available|-autobackup|-continguous|-persistent))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
-@(p|-permission)) -@(p|-permission))
COMPREPLY=( $( compgen -W 'r rw' -- $cur ) ) COMPREPLY=( $( compgen -W 'r rw' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -791,7 +791,7 @@ _lvchange()
-f --force -h --help --ignorelockingfailure -M \ -f --force -h --help --ignorelockingfailure -M \
--persistent --major major --minor minor -P --partial \ --persistent --major major --minor minor -P --partial \
-p --permission -r --readahead --refresh -t --test \ -p --permission -r --readahead --refresh -t --test \
-v --verbose --version' -- $cur ) ) -v --verbose --version' -- "$cur" ) )
else else
_logicalvolumes _logicalvolumes
fi fi
@ -808,7 +808,7 @@ _lvcreate()
case "$prev" in case "$prev" in
-@(A|C|M|Z|-autobackup|-continguous|-persistent|-zero)) -@(A|C|M|Z|-autobackup|-continguous|-persistent|-zero))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
-@(L|-size)) -@(L|-size))
@ -816,7 +816,7 @@ _lvcreate()
return 0 return 0
;; ;;
-@(p|-permission)) -@(p|-permission))
COMPREPLY=( $( compgen -W 'r rw' -- $cur ) ) COMPREPLY=( $( compgen -W 'r rw' -- "$cur" ) )
return 0 return 0
;; ;;
-@(n|-name)) -@(n|-name))
@ -831,7 +831,7 @@ _lvcreate()
-I --stripesize -l --extents -L --size -M --persistent \ -I --stripesize -l --extents -L --size -M --persistent \
--major --minor -n --name -p --permission -r \ --major --minor -n --name -p --permission -r \
--readahead -t --test --type -v --verbose -Z --zero \ --readahead -t --test --type -v --verbose -Z --zero \
--version' -- $cur ) ) --version' -- "$cur" ) )
else else
_args _args
if [ $args -eq 0 ]; then if [ $args -eq 0 ]; then
@ -853,7 +853,7 @@ _lvremove()
case "$prev" in case "$prev" in
-@(A|-autobackup)) -@(A|-autobackup))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -861,7 +861,7 @@ _lvremove()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -f \ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -f \
--force -h -? --help -t --test -v --verbose \ --force -h -? --help -t --test -v --verbose \
--version' -- $cur ) ) --version' -- "$cur" ) )
else else
_logicalvolumes _logicalvolumes
fi fi
@ -878,14 +878,14 @@ _lvrename()
case "$prev" in case "$prev" in
-@(A|-autobackup)) -@(A|-autobackup))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \
-? --help -t --test -v --verbose --version' -- $cur ) ) -? --help -t --test -v --verbose --version' -- "$cur" ) )
else else
_logicalvolumes _logicalvolumes
fi fi
@ -902,7 +902,7 @@ _lvreduce()
case "$prev" in case "$prev" in
-@(A|-autobackup)) -@(A|-autobackup))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
-@(L|-size)) -@(L|-size))
@ -915,7 +915,7 @@ _lvreduce()
COMPREPLY=( $( compgen -W '-A --autobackup -d \ COMPREPLY=( $( compgen -W '-A --autobackup -d \
--debug -f --force -h --help -l --extents \ --debug -f --force -h --help -l --extents \
-L --size -n --nofsck -r --resizefs -t --test \ -L --size -n --nofsck -r --resizefs -t --test \
-v --verbose --version' -- $cur ) ) -v --verbose --version' -- "$cur" ) )
else else
_logicalvolumes _logicalvolumes
fi fi
@ -932,7 +932,7 @@ _lvresize()
case "$prev" in case "$prev" in
-@(A|-autobackup)) -@(A|-autobackup))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
-@(L|-size)) -@(L|-size))
@ -945,7 +945,7 @@ _lvresize()
COMPREPLY=( $( compgen -W '-A --autobackup --alloc -d \ COMPREPLY=( $( compgen -W '-A --autobackup --alloc -d \
--debug -h --help -i --stripes -I --stripesize \ --debug -h --help -i --stripes -I --stripesize \
-l --extents -L --size -n --nofsck -r --resizefs \ -l --extents -L --size -n --nofsck -r --resizefs \
-t --test --type -v --verbose --version' -- $cur ) ) -t --test --type -v --verbose --version' -- "$cur" ) )
else else
_args _args
if [ $args -eq 0 ]; then if [ $args -eq 0 ]; then
@ -967,7 +967,7 @@ _lvextend()
case "$prev" in case "$prev" in
-@(A|-autobackup)) -@(A|-autobackup))
COMPREPLY=( $( compgen -W 'y n' -- $cur ) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur" ) )
return 0 return 0
;; ;;
-@(L|-size)) -@(L|-size))
@ -980,7 +980,7 @@ _lvextend()
COMPREPLY=( $( compgen -W '-A --autobackup --alloc -d \ COMPREPLY=( $( compgen -W '-A --autobackup --alloc -d \
--debug -h --help -i --stripes -I --stripesize \ --debug -h --help -i --stripes -I --stripesize \
-l --extents -L --size -n --nofsck -r --resizefs \ -l --extents -L --size -n --nofsck -r --resizefs \
-t --test --type -v --verbose --version' -- $cur ) ) -t --test --type -v --verbose --version' -- "$cur" ) )
else else
_args _args
if [ $args -eq 0 ]; then if [ $args -eq 0 ]; then
@ -1010,7 +1010,7 @@ _lvm()
vgcreate vgdisplay vgexport vgextend \ vgcreate vgdisplay vgexport vgextend \
vgimport vgmerge vgmknodes vgreduce \ vgimport vgmerge vgmknodes vgreduce \
vgremove vgrename vgs vgscan vgsplit \ vgremove vgrename vgs vgscan vgsplit \
version' -- $cur ) ) version' -- "$cur" ) )
else else
case ${COMP_WORDS[1]} in case ${COMP_WORDS[1]} in
pvchange) pvchange)

View File

@ -17,7 +17,7 @@ _lzma()
-v -V -z -1 -2 -3 -4 -5 -6 -7 -8 -9 \ -v -V -z -1 -2 -3 -4 -5 -6 -7 -8 -9 \
--help --decompress --compress --keep --force \ --help --decompress --compress --keep --force \
--test --stdout --quiet --verbose --license \ --test --stdout --quiet --verbose --license \
--version --small --fast --best --text' -- $cur ) ) --version --small --fast --best --text' -- "$cur" ) )
return 0 return 0
fi fi
@ -36,7 +36,7 @@ _lzma()
_expand || return 0 _expand || return 0
COMPREPLY=( $( compgen -f -X "$xspec" -- $cur ) \ COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
$( compgen -d -- $cur ) ) $( compgen -d -- "$cur" ) )
} && } &&
complete -F _lzma $filenames lzma complete -F _lzma $filenames lzma

View File

@ -24,7 +24,7 @@ _lzop()
--no-time --suffix --keep --unlink --delete --crc32 \ --no-time --suffix --keep --unlink --delete --crc32 \
--no-warn --ignore-warn --quiet --silent --verbose \ --no-warn --ignore-warn --quiet --silent --verbose \
--no-stdin --filter --checksum --no-color --mono \ --no-stdin --filter --checksum --no-color --mono \
--color' -- $cur ) ) --color' -- "$cur" ) )
return 0 return 0
fi fi
@ -47,7 +47,7 @@ _lzop()
_expand || return 0 _expand || return 0
local IFS=$'\t\n' local IFS=$'\t\n'
COMPREPLY=( $( compgen -f -X "$xspec" -- $cur ) \ COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
$( compgen -d -- $cur ) ) $( compgen -d -- "$cur" ) )
} && } &&
complete -F _lzop $filenames lzop complete -F _lzop $filenames lzop

View File

@ -6,7 +6,7 @@
have list_lists && { have list_lists && {
_mailman_lists() _mailman_lists()
{ {
COMPREPLY=( $( compgen -W '$( list_lists -b )' -- $cur ) ) COMPREPLY=( $( compgen -W '$( list_lists -b )' -- "$cur" ) )
} }
_list_lists() _list_lists()
@ -19,7 +19,7 @@ _list_lists()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-a --advertised \ COMPREPLY=( $( compgen -W '-a --advertised \
--virtual-host-overview -V -b --bare \ --virtual-host-overview -V -b --bare \
-h --help' -- $cur ) ) -h --help' -- "$cur" ) )
fi fi
} && } &&
@ -43,7 +43,7 @@ _add_members()
return 0 return 0
;; ;;
-@(w|a|-welcome-msg|-admin-notify)) -@(w|a|-welcome-msg|-admin-notify))
COMPREPLY=( $( compgen -W 'y n' -- $cur) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur") )
return 0 return 0
;; ;;
esac esac
@ -53,7 +53,7 @@ _add_members()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--regular-members-file -r \ COMPREPLY=( $( compgen -W '--regular-members-file -r \
--digest-members-file -d --welcome-msg -w \ --digest-members-file -d --welcome-msg -w \
--admin-notify -a --help -h' -- $cur ) ) --admin-notify -a --help -h' -- "$cur" ) )
else else
_mailman_lists _mailman_lists
fi fi
@ -84,7 +84,7 @@ _remove_members()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--file -f --all -a \ COMPREPLY=( $( compgen -W '--file -f --all -a \
--fromall --nouserack -n --noadminack -N \ --fromall --nouserack -n --noadminack -N \
--help -h' -- $cur ) ) --help -h' -- "$cur" ) )
else else
_mailman_lists _mailman_lists
fi fi
@ -114,7 +114,7 @@ _find_member()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-l --listname -x \ COMPREPLY=( $( compgen -W '-l --listname -x \
--exclude --owners -w --help -h' -- $cur ) ) --exclude --owners -w --help -h' -- "$cur" ) )
fi fi
} && } &&
@ -142,7 +142,7 @@ _clone_member()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-l --listname --remove -r \ COMPREPLY=( $( compgen -W '-l --listname --remove -r \
--admin -a --quiet -q --nomodify -n --help -h' -- $cur ) ) --admin -a --quiet -q --nomodify -n --help -h' -- "$cur" ) )
fi fi
} && } &&
@ -161,7 +161,7 @@ _sync_members()
case "$prev" in case "$prev" in
-@(w|g|d|--welcome-msg|-goodbye-msg|-digest)) -@(w|g|d|--welcome-msg|-goodbye-msg|-digest))
COMPREPLY=( $( compgen -W 'y n' -- $cur) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur") )
return 0 return 0
;; ;;
-@(d|-file)) -@(d|-file))
@ -175,7 +175,7 @@ _sync_members()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--no-change -n --welcome-msg -w \ COMPREPLY=( $( compgen -W '--no-change -n --welcome-msg -w \
--goodbye-msg -g --digest -d --notifyadmin -a \ --goodbye-msg -g --digest -d --notifyadmin -a \
-f --file -h --help' -- $cur ) ) -f --file -h --help' -- "$cur" ) )
else else
_mailman_lists _mailman_lists
fi fi
@ -192,7 +192,7 @@ _unshunt()
cur=`_get_cword` cur=`_get_cword`
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h --help' -- $cur ) ) COMPREPLY=( $( compgen -W '-h --help' -- "$cur" ) )
else else
_filedir -d _filedir -d
fi fi
@ -210,7 +210,7 @@ _list_admins()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--all-vhost -v \ COMPREPLY=( $( compgen -W '--all-vhost -v \
--all -a -h --help' -- $cur ) ) --all -a -h --help' -- "$cur" ) )
else else
_mailman_lists _mailman_lists
fi fi
@ -228,7 +228,7 @@ _list_owners()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-w --with-listnames \ COMPREPLY=( $( compgen -W '-w --with-listnames \
-m --moderators -h --help' -- $cur ) ) -m --moderators -h --help' -- "$cur" ) )
else else
_mailman_lists _mailman_lists
fi fi
@ -253,11 +253,11 @@ _list_members()
return 0 return 0
;; ;;
-@(d|-digest)) -@(d|-digest))
COMPREPLY=( $( compgen -W 'mime plain' -- $cur) ) COMPREPLY=( $( compgen -W 'mime plain' -- "$cur") )
return 0 return 0
;; ;;
-@(n|-nomail)) -@(n|-nomail))
COMPREPLY=( $( compgen -W 'byadmin byuser bybounce unknown' -- $cur) ) COMPREPLY=( $( compgen -W 'byadmin byuser bybounce unknown' -- "$cur") )
return 0 return 0
;; ;;
esac esac
@ -267,7 +267,7 @@ _list_members()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--output -o --regular -r \ COMPREPLY=( $( compgen -W '--output -o --regular -r \
--digest -d --nomail -n --fullnames -f \ --digest -d --nomail -n --fullnames -f \
--preserve -p -h --help' -- $cur ) ) --preserve -p -h --help' -- "$cur" ) )
else else
_mailman_lists _mailman_lists
fi fi
@ -297,7 +297,7 @@ _change_pw()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-a --all --domain -d --listname -l \ COMPREPLY=( $( compgen -W '-a --all --domain -d --listname -l \
--password -p --quiet -q -h --help' -- $cur ) ) --password -p --quiet -q -h --help' -- "$cur" ) )
fi fi
} && } &&
@ -313,7 +313,7 @@ _withlist()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-l --lock -i --interactive \ COMPREPLY=( $( compgen -W '-l --lock -i --interactive \
-r --run -a --all -q --quiet -h --help' -- $cur ) ) -r --run -a --all -q --quiet -h --help' -- "$cur" ) )
else else
_mailman_lists _mailman_lists
fi fi
@ -330,7 +330,7 @@ _newlist()
cur=`_get_cword` cur=`_get_cword`
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-l --language -q --quiet -h --help' -- $cur ) ) COMPREPLY=( $( compgen -W '-l --language -q --quiet -h --help' -- "$cur" ) )
else else
_mailman_lists _mailman_lists
fi fi
@ -348,7 +348,7 @@ _rmlist()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--archives -a \ COMPREPLY=( $( compgen -W '--archives -a \
-h --help' -- $cur ) ) -h --help' -- "$cur" ) )
else else
_mailman_lists _mailman_lists
fi fi
@ -378,7 +378,7 @@ _config_list()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--inputfile -i --outputfile -o \ COMPREPLY=( $( compgen -W '--inputfile -i --outputfile -o \
--checkonly -c --verbose -v -h --help' -- $cur ) ) --checkonly -c --verbose -v -h --help' -- "$cur" ) )
else else
_mailman_lists _mailman_lists
fi fi
@ -399,7 +399,7 @@ _arch()
case "$prev" in case "$prev" in
-@(w|g|d|--welcome-msg|-goodbye-msg|-digest)) -@(w|g|d|--welcome-msg|-goodbye-msg|-digest))
COMPREPLY=( $( compgen -W 'y n' -- $cur) ) COMPREPLY=( $( compgen -W 'y n' -- "$cur") )
return 0 return 0
;; ;;
-@(d|-file)) -@(d|-file))
@ -412,7 +412,7 @@ _arch()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--wipe -s --start -e --end \ COMPREPLY=( $( compgen -W '--wipe -s --start -e --end \
-q --quiet -h --help' -- $cur ) ) -q --quiet -h --help' -- "$cur" ) )
else else
args=$COMP_CWORD args=$COMP_CWORD
for (( i=1; i < COMP_CWORD; i++ )); do for (( i=1; i < COMP_CWORD; i++ )); do
@ -443,7 +443,7 @@ _cleanarch()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-s --status -n --dry-run \ COMPREPLY=( $( compgen -W '-s --status -n --dry-run \
-q --quiet -h --help' -- $cur ) ) -q --quiet -h --help' -- "$cur" ) )
fi fi
} && } &&
@ -471,7 +471,7 @@ _inject()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-l --listname -q --queue \ COMPREPLY=( $( compgen -W '-l --listname -q --queue \
-h --help' -- $cur ) ) -h --help' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -488,7 +488,7 @@ _dumpdb()
cur=`_get_cword` cur=`_get_cword`
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--marshal -m --pickle -p --noprint -n -h --help' -- $cur ) ) COMPREPLY=( $( compgen -W '--marshal -m --pickle -p --noprint -n -h --help' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -506,7 +506,7 @@ _check_db()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--all -a --verbose -v \ COMPREPLY=( $( compgen -W '--all -a --verbose -v \
-h --help' -- $cur ) ) -h --help' -- "$cur" ) )
else else
_mailman_lists _mailman_lists
fi fi
@ -523,7 +523,7 @@ _check_perms()
cur=`_get_cword` cur=`_get_cword`
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-f -v -h' -- $cur ) ) COMPREPLY=( $( compgen -W '-f -v -h' -- "$cur" ) )
fi fi
} && } &&
@ -538,7 +538,7 @@ _genaliases()
cur=`_get_cword` cur=`_get_cword`
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-q --quiet -h --help' -- $cur ) ) COMPREPLY=( $( compgen -W '-q --quiet -h --help' -- "$cur" ) )
fi fi
} && } &&
@ -553,7 +553,7 @@ _mmsitepass()
cur=`_get_cword` cur=`_get_cword`
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-c --listcreator -h --help' -- $cur ) ) COMPREPLY=( $( compgen -W '-c --listcreator -h --help' -- "$cur" ) )
fi fi
} && } &&
@ -572,7 +572,7 @@ _qrunner()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-r --runner --once -o \ COMPREPLY=( $( compgen -W '-r --runner --once -o \
-l --list -v --verbose -s --subproc -h --help' -- $cur ) ) -l --list -v --verbose -s --subproc -h --help' -- "$cur" ) )
fi fi
} && } &&
@ -588,9 +588,9 @@ _mailmanctl()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-n --no-restart -u --run-as-user \ COMPREPLY=( $( compgen -W '-n --no-restart -u --run-as-user \
-s --stale-lock-cleanup --quiet -q -h --help' -- $cur ) ) -s --stale-lock-cleanup --quiet -q -h --help' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W 'start stop restart reopen' -- $cur ) ) COMPREPLY=( $( compgen -W 'start stop restart reopen' -- "$cur" ) )
fi fi
} && } &&

View File

@ -39,7 +39,7 @@ _make()
--silent --quiet --no-keep-goind --stop --touch \ --silent --quiet --no-keep-goind --stop --touch \
--version --print-directory --no-print-directory \ --version --print-directory --no-print-directory \
--what-if --new-file --assume-new \ --what-if --new-file --assume-new \
--warn-undefined-variables' -- $cur ) ) --warn-undefined-variables' -- "$cur" ) )
else else
# before we check for makefiles, see if a path was specified # before we check for makefiles, see if a path was specified
# with -C # with -C
@ -67,7 +67,7 @@ _make()
COMPREPLY=( $( compgen -W "$( make -qp $makef $makef_dir 2>/dev/null | \ COMPREPLY=( $( compgen -W "$( make -qp $makef $makef_dir 2>/dev/null | \
awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ \ awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ \
{split($1,A,/ /);for(i in A)print A[i]}' )" \ {split($1,A,/ /);for(i in A)print A[i]}' )" \
-- $cur ) ) -- "$cur" ) )
fi fi
} && } &&

View File

@ -38,7 +38,7 @@ _man()
fi fi
if [ -z "$manpath" ]; then if [ -z "$manpath" ]; then
COMPREPLY=( $( compgen -c -- $cur ) ) COMPREPLY=( $( compgen -c -- "$cur" ) )
return 0 return 0
fi fi

View File

@ -37,7 +37,7 @@ _mc()
--datadir -k --resetsoft -l --ftplog -P --printwd \ --datadir -k --resetsoft -l --ftplog -P --printwd \
-s --slow -t --termcap -u --nosubshell -U --subshell \ -s --slow -t --termcap -u --nosubshell -U --subshell \
-v --view -V --version -x --xterm -D --debuglevel -h \ -v --view -V --version -x --xterm -D --debuglevel -h \
--help' -- $cur ) ) --help' -- "$cur" ) )
else else
_filedir -d _filedir -d
fi fi

View File

@ -15,28 +15,28 @@ _mcrypt()
case "$prev" in case "$prev" in
-@(g|-openpgp-z)) -@(g|-openpgp-z))
COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' \ COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-@(o|-keymode)) -@(o|-keymode))
COMPREPLY=( $( compgen -W '$( mcrypt --list-keymodes \ COMPREPLY=( $( compgen -W '$( mcrypt --list-keymodes \
2>/dev/null )' -- $cur ) ) 2>/dev/null )' -- "$cur" ) )
return 0 return 0
;; ;;
-@(m|-mode)) -@(m|-mode))
COMPREPLY=( $( compgen -W "$( mcrypt --list \ COMPREPLY=( $( compgen -W "$( mcrypt --list \
2>/dev/null | sed -e 's/.*: //' -e 's/ $//' | \ 2>/dev/null | sed -e 's/.*: //' -e 's/ $//' | \
sort | uniq )" -- $cur ) ) sort | uniq )" -- "$cur" ) )
return 0 return 0
;; ;;
-@(a|-algorithm)) -@(a|-algorithm))
COMPREPLY=( $( compgen -W "$( mcrypt --list \ COMPREPLY=( $( compgen -W "$( mcrypt --list \
2>/dev/null | awk '{print $1}' )" -- $cur ) ) 2>/dev/null | awk '{print $1}' )" -- "$cur" ) )
return 0 return 0
;; ;;
-@(h|-hash)) -@(h|-hash))
COMPREPLY=( $( compgen -W '$( mcrypt --list-hash \ COMPREPLY=( $( compgen -W '$( mcrypt --list-hash \
2>/dev/null | sed -e 1d )' -- $cur ) ) 2>/dev/null | sed -e 1d )' -- "$cur" ) )
return 0 return 0
;; ;;
-@(k|s|-@(key?(size)))) -@(k|s|-@(key?(size))))
@ -61,7 +61,7 @@ _mcrypt()
--doublecheck -u --unlink --nodelete -t --time -F \ --doublecheck -u --unlink --nodelete -t --time -F \
--force --echo -r --random --list --list-keymodes \ --force --echo -r --random --list --list-keymodes \
--list-hash -V --verbose -q --quiet --help -v \ --list-hash -V --verbose -q --quiet --help -v \
--version -L --license' -- $cur ) ) --version -L --license' -- "$cur" ) )
elif [[ ${COMP_WORDS[0]} == mdecrypt ]]; then elif [[ ${COMP_WORDS[0]} == mdecrypt ]]; then
_filedir '@(nc)' _filedir '@(nc)'
else else

View File

@ -23,10 +23,10 @@ _mdadm_raid_level()
case $mode in case $mode in
create) create)
COMPREPLY=( $( compgen -W 'linear raid0 0 stripe raid1 1 mirror raid4 4 raid5 5 raid6 6 raid10 10 multipath mp faulty' -- $cur ) ) COMPREPLY=( $( compgen -W 'linear raid0 0 stripe raid1 1 mirror raid4 4 raid5 5 raid6 6 raid10 10 multipath mp faulty' -- "$cur" ) )
;; ;;
build) build)
COMPREPLY=( $( compgen -W 'linear stripe raid0 0 raid1 multipath mp faulty' -- $cur ) ) COMPREPLY=( $( compgen -W 'linear stripe raid0 0 raid1 multipath mp faulty' -- "$cur" ) )
;; ;;
esac esac
} }
@ -43,10 +43,10 @@ _mdadm_raid_layout()
case $level in case $level in
raid5) raid5)
COMPREPLY=( $( compgen -W 'left-asymmetric left-symmetric right-asymmetric right-symmetric la ra ls rs' -- $cur ) ) COMPREPLY=( $( compgen -W 'left-asymmetric left-symmetric right-asymmetric right-symmetric la ra ls rs' -- "$cur" ) )
;; ;;
raid10) raid10)
COMPREPLY=( $( compgen -W 'n o p' -- $cur ) ) COMPREPLY=( $( compgen -W 'n o p' -- "$cur" ) )
;; ;;
faulty) faulty)
COMPREPLY=( $( compgen -W 'write-transient wt read-transient rt write-persistent wp read-persistent rp write-all read-fixable rf clear flush none' -- $cur ) ) COMPREPLY=( $( compgen -W 'write-transient wt read-transient rt write-persistent wp read-persistent rp write-all read-fixable rf clear flush none' -- $cur ) )
@ -56,12 +56,12 @@ _mdadm_raid_layout()
_mdadm_auto_flag() _mdadm_auto_flag()
{ {
COMPREPLY=( $( compgen -W 'no yes md mdp part p' -- $cur ) ) COMPREPLY=( $( compgen -W 'no yes md mdp part p' -- "$cur" ) )
} }
_mdadm_update_flag() _mdadm_update_flag()
{ {
COMPREPLY=( $( compgen -W 'sparc2.2 summaries uuid name homehost resync byteorder super-minor' -- $cur ) ) COMPREPLY=( $( compgen -W 'sparc2.2 summaries uuid name homehost resync byteorder super-minor' -- "$cur" ) )
} }
@ -129,24 +129,24 @@ _mdadm()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
if [[ $COMP_CWORD -eq 1 ]] ; then if [[ $COMP_CWORD -eq 1 ]] ; then
COMPREPLY=( $( compgen -W "$options -A --assemble -B --build -C --create -F --follow --monitor -G --grow" -- $cur ) ) COMPREPLY=( $( compgen -W "$options -A --assemble -B --build -C --create -F --follow --monitor -G --grow" -- "$cur" ) )
else else
case ${COMP_WORDS[COMP_CWORD-1]} in case ${COMP_WORDS[COMP_CWORD-1]} in
-@(A|-assemble)) -@(A|-assemble))
COMPREPLY=( $( compgen -W "$options -u --uuid= -m --super-minor= -N --name= -f --force -R --run --no-degraded -a --auto -b --bitmap= --backup-file= -U --update= --auto-update-homehost" -- $cur ) ) COMPREPLY=( $( compgen -W "$options -u --uuid= -m --super-minor= -N --name= -f --force -R --run --no-degraded -a --auto -b --bitmap= --backup-file= -U --update= --auto-update-homehost" -- "$cur" ) )
;; ;;
-@(B|C|G|-build|-create|-grow)) -@(B|C|G|-build|-create|-grow))
COMPREPLY=( $( compgen -W "$options -n --raid-devices= -x --spare-devices= -z --size= -c --chunk= --rounding= -l --level= -p --layout= --parity= -b --bitmap= --bitmap-chunk= -W --write-mostly --write-behind= --assume-clean --backup-file= -N --name= -R --run -f --force -a --auto" -- $cur ) ) COMPREPLY=( $( compgen -W "$options -n --raid-devices= -x --spare-devices= -z --size= -c --chunk= --rounding= -l --level= -p --layout= --parity= -b --bitmap= --bitmap-chunk= -W --write-mostly --write-behind= --assume-clean --backup-file= -N --name= -R --run -f --force -a --auto" -- "$cur" ) )
;; ;;
-@(F|-follow|-monitor)) -@(F|-follow|-monitor))
COMPREPLY=( $( compgen -W "$options -m --mail -p --program --alert -y --syslog -d --delay -f --daemonise -i --pid-file -1 --oneshot -t --test" -- $cur ) ) COMPREPLY=( $( compgen -W "$options -m --mail -p --program --alert -y --syslog -d --delay -f --daemonise -i --pid-file -1 --oneshot -t --test" -- "$cur" ) )
;; ;;
@(/dev/*|--add|--fail|--remove)) @(/dev/*|--add|--fail|--remove))
COMPREPLY=( $( compgen -W "$options -a --add --re-add -r --remove -f --fail --set-faulty" -- $cur ) ) COMPREPLY=( $( compgen -W "$options -a --add --re-add -r --remove -f --fail --set-faulty" -- "$cur" ) )
;; ;;
*) *)
COMPREPLY=( $( compgen -W "$options -Q --query -D --detail -E --examine --sparc2.2 -X --examine-bitmap -R --run -S --stop -o --readonly -w --readwrite --zero-superblock -t --test" -- $cur ) ) COMPREPLY=( $( compgen -W "$options -Q --query -D --detail -E --examine --sparc2.2 -X --examine-bitmap -R --run -S --stop -o --readonly -w --readwrite --zero-superblock -t --test" -- "$cur" ) )
;; ;;
esac esac
fi fi

View File

@ -14,7 +14,7 @@ _minicom()
case $prev in case $prev in
-@(a|c)) -@(a|c))
COMPREPLY=( $( compgen -W 'on off' -- $cur ) ) COMPREPLY=( $( compgen -W 'on off' -- "$cur" ) )
return 0 return 0
;; ;;
-@(S|C)) -@(S|C))
@ -23,7 +23,7 @@ _minicom()
;; ;;
-P) -P)
COMPREPLY=( $( command ls /dev/tty* ) ) COMPREPLY=( $( command ls /dev/tty* ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}' -- $cur ) ) COMPREPLY=( $( compgen -W '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -31,14 +31,14 @@ _minicom()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-s -o -m -M -z -l -L -w -a -t \ COMPREPLY=( $( compgen -W '-s -o -m -M -z -l -L -w -a -t \
-c -S -d -p -C -T -7 -8' -- $cur ) ) -c -S -d -p -C -T -7 -8' -- "$cur" ) )
return 0 return 0
else else
[ -n "$( command ls /etc/minirc.* 2>/dev/null)" ] && confdir=/etc [ -n "$( command ls /etc/minirc.* 2>/dev/null)" ] && confdir=/etc
[ -n "$( command ls /etc/minicom/minirc.* 2>/dev/null)" ] && confdir=/etc/minicom [ -n "$( command ls /etc/minicom/minirc.* 2>/dev/null)" ] && confdir=/etc/minicom
if [ -n "$confdir" ]; then if [ -n "$confdir" ]; then
COMPREPLY=( $( compgen -W '$( command ls $confdir/minirc.* | \ COMPREPLY=( $( compgen -W '$( command ls $confdir/minirc.* | \
sed -e "s|$confdir/minirc.||")' -- $cur ) ) sed -e "s|$confdir/minirc.||")' -- "$cur" ) )
return 0 return 0
fi fi
fi fi

View File

@ -37,7 +37,7 @@ _mkinitrd()
--omit-ide-modules --image-version --force-raid-probe \ --omit-ide-modules --image-version --force-raid-probe \
--omit-raid-modules --with --force-lvm-probe \ --omit-raid-modules --with --force-lvm-probe \
--omit-lvm-modules --builtin --omit-dmraid --net-dev \ --omit-lvm-modules --builtin --omit-dmraid --net-dev \
--fstab --nocompress --dsdt --bootchart' -- $cur ) ) --fstab --nocompress --dsdt --bootchart' -- "$cur" ) )
else else
_count_args _count_args

View File

@ -50,11 +50,11 @@ _mock()
# (e.g. ix86 chroot builds in x86_64 mock host) # (e.g. ix86 chroot builds in x86_64 mock host)
# This would actually depend on what the target root # This would actually depend on what the target root
# can be used to build for... # can be used to build for...
COMPREPLY=( $( compgen -W "$( command rpm --showrc | sed -ne 's/^\s*compatible\s\+archs\s*:\s*\(.*\)/\1/i p' )" -- $cur ) ) COMPREPLY=( $( compgen -W "$( command rpm --showrc | sed -ne 's/^\s*compatible\s\+archs\s*:\s*\(.*\)/\1/i p' )" -- "$cur" ) )
return 0 return 0
;; ;;
--@(en|dis)able-plugin) --@(en|dis)able-plugin)
COMPREPLY=( $( compgen -W "$plugins" -- $cur ) ) COMPREPLY=( $( compgen -W "$plugins" -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -71,7 +71,7 @@ _mock()
--configdir --rpmbuild_timeout --unpriv --cwd --spec \ --configdir --rpmbuild_timeout --unpriv --cwd --spec \
--sources -v --verbose -q --quiet --trace \ --sources -v --verbose -q --quiet --trace \
--enable-plugin --disable-plugin --print-root-path' \ --enable-plugin --disable-plugin --print-root-path' \
-- $cur ) ) -- "$cur" ) )
else else
_filedir '?(no)src.rpm' _filedir '?(no)src.rpm'
fi fi

View File

@ -57,26 +57,26 @@ _module () {
options="$( module help 2>&1 | egrep '^[[:space:]]*\+' | \ options="$( module help 2>&1 | egrep '^[[:space:]]*\+' | \
awk '{print $2}' | sed -e 's/|/ /g' | sort )" awk '{print $2}' | sed -e 's/|/ /g' | sort )"
COMPREPLY=( $(compgen -W "$options" -- $cur) ) COMPREPLY=( $(compgen -W "$options" -- "$cur") )
elif [ $COMP_CWORD -eq 2 ] ; then elif [ $COMP_CWORD -eq 2 ] ; then
case "$prev" in case "$prev" in
@(add|display|help|load|show|whatis)) @(add|display|help|load|show|whatis))
COMPREPLY=( $(_module_avail $cur) ) COMPREPLY=( $(_module_avail "$cur") )
;; ;;
@(rm|switch|swap|unload|update)) @(rm|switch|swap|unload|update))
COMPREPLY=( $(_module_list $cur) ) COMPREPLY=( $(_module_list "$cur") )
;; ;;
unuse) unuse)
COMPREPLY=( $(_module_path $cur) ) COMPREPLY=( $(_module_path "$cur") )
;; ;;
esac esac
elif [ $COMP_CWORD -eq 3 ] ; then elif [ $COMP_CWORD -eq 3 ] ; then
case ${COMP_WORDS[1]} in case ${COMP_WORDS[1]} in
@(sw?(ap|itch))) @(sw?(ap|itch)))
COMPREPLY=( $(_module_avail $cur) ) COMPREPLY=( $(_module_avail "$cur") )
;; ;;
esac esac
fi fi

View File

@ -9,7 +9,7 @@ _mplayer_options_list()
cur=${cur%\\} cur=${cur%\\}
COMPREPLY=( $( compgen -W "$( $1 $2 help 2>/dev/null | \ COMPREPLY=( $( compgen -W "$( $1 $2 help 2>/dev/null | \
sed -e '1,/^Available/d' | awk '{print $1}' | \ sed -e '1,/^Available/d' | awk '{print $1}' | \
sed -e 's/:$//' -e 's/^'${2#-}'$//' -e 's/<.*//' )" -- $cur ) ) sed -e 's/:$//' -e 's/^'${2#-}'$//' -e 's/<.*//' )" -- "$cur" ) )
} }
_mplayer() _mplayer()
@ -108,7 +108,7 @@ _mplayer()
;; ;;
-lavdopts) -lavdopts)
COMPREPLY=( $( compgen -W 'ec er= bug= idct= gray' \ COMPREPLY=( $( compgen -W 'ec er= bug= idct= gray' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-lavcopts) -lavcopts)
@ -128,22 +128,22 @@ _mplayer()
format= pred qpel precmp= cmp= \ format= pred qpel precmp= cmp= \
subcmp= predia= dia= trell last_pred= \ subcmp= predia= dia= trell last_pred= \
preme= subq= psnr mpeg_quant aic umv' \ preme= subq= psnr mpeg_quant aic umv' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-ssf) -ssf)
COMPREPLY=( $( compgen -W 'lgb= cgb= ls= cs= chs= \ COMPREPLY=( $( compgen -W 'lgb= cgb= ls= cs= chs= \
cvs=' -- $cur ) ) cvs=' -- "$cur" ) )
return 0 return 0
;; ;;
-jpeg) -jpeg)
COMPREPLY=( $( compgen -W 'noprogressive progressive \ COMPREPLY=( $( compgen -W 'noprogressive progressive \
nobaseline baseline optimize= \ nobaseline baseline optimize= \
smooth= quality= outdir=' -- $cur ) ) smooth= quality= outdir=' -- "$cur" ) )
return 0 return 0
;; ;;
-xvidopts) -xvidopts)
COMPREPLY=( $( compgen -W 'dr2 nodr2' -- $cur ) ) COMPREPLY=( $( compgen -W 'dr2 nodr2' -- "$cur" ) )
return 0 return 0
;; ;;
-xvidencopts) -xvidencopts)
@ -155,7 +155,7 @@ _mplayer()
max_key_interval= mpeg_quant \ max_key_interval= mpeg_quant \
mod_quant lumi_mask hintedme \ mod_quant lumi_mask hintedme \
hintfile debug keyframe_boost= \ hintfile debug keyframe_boost= \
kfthreshold= kfreduction=' -- $cur ) ) kfthreshold= kfreduction=' -- "$cur" ) )
return 0 return 0
;; ;;
-divx4opts) -divx4opts)
@ -163,35 +163,35 @@ _mplayer()
min_quant= max_quant= rc_period= \ min_quant= max_quant= rc_period= \
rc_reaction_period= crispness= \ rc_reaction_period= crispness= \
rc_reaction_ratio= pass= vbrpass= \ rc_reaction_ratio= pass= vbrpass= \
help' -- $cur ) ) help' -- "$cur" ) )
return 0 return 0
;; ;;
-info) -info)
COMPREPLY=( $( compgen -W 'name= artist= genre= \ COMPREPLY=( $( compgen -W 'name= artist= genre= \
subject= copyright= srcform= \ subject= copyright= srcform= \
comment= help' -- $cur ) ) comment= help' -- "$cur" ) )
return 0 return 0
;; ;;
-lameopts) -lameopts)
COMPREPLY=( $( compgen -W 'vbr= abr cbr br= q= aq= \ COMPREPLY=( $( compgen -W 'vbr= abr cbr br= q= aq= \
ratio= vol= mode= padding= fast \ ratio= vol= mode= padding= fast \
preset= help' -- $cur ) ) preset= help' -- "$cur" ) )
return 0 return 0
;; ;;
-rawaudio) -rawaudio)
COMPREPLY=( $( compgen -W 'on channels= rate= \ COMPREPLY=( $( compgen -W 'on channels= rate= \
samplesize= format=' -- $cur ) ) samplesize= format=' -- "$cur" ) )
return 0 return 0
;; ;;
-rawvideo) -rawvideo)
COMPREPLY=( $( compgen -W 'on fps= sqcif qcif cif \ COMPREPLY=( $( compgen -W 'on fps= sqcif qcif cif \
4cif pal ntsc w= h= y420 yv12 yuy2 \ 4cif pal ntsc w= h= y420 yv12 yuy2 \
y8 format= size=' -- $cur ) ) y8 format= size=' -- "$cur" ) )
return 0 return 0
;; ;;
-aop) -aop)
COMPREPLY=( $( compgen -W 'list= delay= format= fout= \ COMPREPLY=( $( compgen -W 'list= delay= format= fout= \
volume= mul= softclip' -- $cur ) ) volume= mul= softclip' -- "$cur" ) )
return 0 return 0
;; ;;
-dxr2) -dxr2)
@ -204,7 +204,7 @@ _mplayer()
ck-bmax= ck-r= ck-g= ck-b= \ ck-bmax= ck-r= ck-g= ck-b= \
ignore-cache= ol-osd= olh-cor= \ ignore-cache= ol-osd= olh-cor= \
olw-cor= olx-cor= oly-cor= overlay \ olw-cor= olx-cor= oly-cor= overlay \
overlay-ratio= update-cache' -- $cur )) overlay-ratio= update-cache' -- "$cur" ))
return 0 return 0
;; ;;
-tv) -tv)
@ -214,24 +214,24 @@ _mplayer()
audiorate= forceaudio alsa amode= \ audiorate= forceaudio alsa amode= \
forcechan= adevice= audioid= volume= \ forcechan= adevice= audioid= volume= \
bass= treble= balance= fps= \ bass= treble= balance= fps= \
channels= immediatemode=' -- $cur ) ) channels= immediatemode=' -- "$cur" ) )
return 0 return 0
;; ;;
-mf) -mf)
COMPREPLY=( $( compgen -W 'on w= h= fps= type=' \ COMPREPLY=( $( compgen -W 'on w= h= fps= type=' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-cdda) -cdda)
COMPREPLY=( $( compgen -W 'speed= paranoia= \ COMPREPLY=( $( compgen -W 'speed= paranoia= \
generic-dev= sector-size= overlap= \ generic-dev= sector-size= overlap= \
toc-bias toc-offset= skip noskip' \ toc-bias toc-offset= skip noskip' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-input) -input)
COMPREPLY=( $( compgen -W 'conf= ar-delay ar-rate \ COMPREPLY=( $( compgen -W 'conf= ar-delay ar-rate \
keylist cmdlist js-dev file' -- $cur ) ) keylist cmdlist js-dev file' -- "$cur" ) )
return 0 return 0
;; ;;
-af) -af)
@ -239,11 +239,11 @@ _mplayer()
channels channels= format format= \ channels channels= format format= \
volume volume= delay delay= pan \ volume volume= delay delay= pan \
pan= sub sub= surround surround=' \ pan= sub sub= surround surround=' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-af-adv) -af-adv)
COMPREPLY=( $( compgen -W 'force= list=' -- $cur ) ) COMPREPLY=( $( compgen -W 'force= list=' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -253,7 +253,7 @@ _mplayer()
COMPREPLY=( $( compgen -W '$( $cmd -list-options 2>/dev/null | \ COMPREPLY=( $( compgen -W '$( $cmd -list-options 2>/dev/null | \
sed -ne '1,/^[[:space:]]*Name/d' \ sed -ne '1,/^[[:space:]]*Name/d' \
-e "s/^[[:space:]]*/-/" -e "s/[[:space:]:].*//" \ -e "s/^[[:space:]]*/-/" -e "s/[[:space:]:].*//" \
-e "/^-\(Total\|.*\*\)\?$/!p" )' -- $cur ) ) -e "/^-\(Total\|.*\*\)\?$/!p" )' -- "$cur" ) )
;; ;;
*) *)
_filedir '@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|ps|PS|pes|PES|fl[iv]|FL[IV]|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[234]|MP[234]|m4[av]|M4[AV]|og[gmavx]|OG[GMAVX]|w?(a)v|W?(A)V|dump|DUMP|mk[av]|MK[AV]|m4a|M4A|aac|AAC|m[24]v|M[24]V|dv|DV|rmvb|RMVB|mid|MID|ts|TS|3g[p2]|mpc|MPC|flac|FLAC|vro|VRO|divx|DIVX|aif?(f)|AIF?(F)|m2ts|M2TS|vdr|VDR|xvid|XVID|ape|APE)' _filedir '@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|ps|PS|pes|PES|fl[iv]|FL[IV]|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[234]|MP[234]|m4[av]|M4[AV]|og[gmavx]|OG[GMAVX]|w?(a)v|W?(A)V|dump|DUMP|mk[av]|MK[AV]|m4a|M4A|aac|AAC|m[24]v|M[24]V|dv|DV|rmvb|RMVB|mid|MID|ts|TS|3g[p2]|mpc|MPC|flac|FLAC|vro|VRO|divx|DIVX|aif?(f)|AIF?(F)|m2ts|M2TS|vdr|VDR|xvid|XVID|ape|APE)'

View File

@ -19,12 +19,12 @@ _msynctool()
--configure) --configure)
COMPREPLY=( $( compgen -W "$(msynctool --showgroup \ COMPREPLY=( $( compgen -W "$(msynctool --showgroup \
$prev | awk '/^Member/ {print $2}' | sed \ $prev | awk '/^Member/ {print $2}' | sed \
-e 's/:$//' )" -- $cur ) ) -e 's/:$//' )" -- "$cur" ) )
return 0 return 0
;; ;;
--addmember) --addmember)
COMPREPLY=( $( compgen -W '$(msynctool --listplugins \ COMPREPLY=( $( compgen -W '$(msynctool --listplugins \
| sed -e '1d' )' -- $cur ) ) | sed -e '1d' )' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -32,12 +32,12 @@ _msynctool()
case $prev in case $prev in
--@(configure|@(add|del|show)group|sync|addmember)) --@(configure|@(add|del|show)group|sync|addmember))
COMPREPLY=( $( compgen -W '$(msynctool --listgroups \ COMPREPLY=( $( compgen -W '$(msynctool --listgroups \
| sed -e '1d' )' -- $cur ) ) | sed -e '1d' )' -- "$cur" ) )
return 0 return 0
;; ;;
--@(showformats|filter-objtype|slow-sync)) --@(showformats|filter-objtype|slow-sync))
COMPREPLY=( $( compgen -W '$(msynctool --listobjects \ COMPREPLY=( $( compgen -W '$(msynctool --listobjects \
| sed -e '1d' )' -- $cur ) ) | sed -e '1d' )' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -45,6 +45,6 @@ _msynctool()
COMPREPLY=( $( compgen -W '--listgroups --listplugins --listobjects \ COMPREPLY=( $( compgen -W '--listgroups --listplugins --listobjects \
--showformats --showgroup --sync --filter-objtype --slow-sync \ --showformats --showgroup --sync --filter-objtype --slow-sync \
--wait --multi --addgroup --delgroup --addmember --configure \ --wait --multi --addgroup --delgroup --addmember --configure \
--manual --configdir --conflict' -- $cur ) ) --manual --configdir --conflict' -- "$cur" ) )
} && } &&
complete -F _msynctool msynctool complete -F _msynctool msynctool

View File

@ -27,10 +27,10 @@ _mtx()
if [ $COMP_CWORD -gt 1 ]; then if [ $COMP_CWORD -gt 1 ]; then
case $prev in case $prev in
load) load)
COMPREPLY=( $( compgen -W "$tapes" -- $cur ) ) COMPREPLY=( $( compgen -W "$tapes" -- "$cur" ) )
;; ;;
unload|first|last|next) unload|first|last|next)
COMPREPLY=( $( compgen -W "$drives" -- $cur ) ) COMPREPLY=( $( compgen -W "$drives" -- "$cur" ) )
;; ;;
-f) -f)
true true
@ -40,7 +40,7 @@ _mtx()
;; ;;
esac esac
else else
COMPREPLY=( $( compgen -W "$options" -- $cur ) ) COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
fi fi
return 0 return 0
} && } &&

View File

@ -25,10 +25,10 @@ _munin-run()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--config --servicedir --sconfdir \ COMPREPLY=( $( compgen -W '--config --servicedir --sconfdir \
--sconffile --help --debug --version' -- $cur ) ) --sconffile --help --debug --version' -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W '$( command ls /etc/munin/plugins )' \ COMPREPLY=( $( compgen -W '$( command ls /etc/munin/plugins )' \
-- $cur ) ) -- "$cur" ) )
fi fi
} && } &&
complete -F _munin-run munin-run complete -F _munin-run munin-run
@ -57,7 +57,7 @@ _munin-update()
COMPREPLY=( $( compgen -W '--force-root --[no]force-root \ COMPREPLY=( $( compgen -W '--force-root --[no]force-root \
--service --host --config --help --debug --nodebug \ --service --host --config --help --debug --nodebug \
--fork --nofork --stdout --nostdout --timeout' \ --fork --nofork --stdout --nostdout --timeout' \
-- $cur ) ) -- "$cur" ) )
fi fi
} && } &&
complete -F _munin-update munin-update complete -F _munin-update munin-update
@ -85,7 +85,7 @@ _munin-node-configure()
return 0 return 0
;; ;;
--snmpversion) --snmpversion)
COMPREPLY=( $( compgen -W '1 2c 3' -- $cur ) ) COMPREPLY=( $( compgen -W '1 2c 3' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -94,7 +94,7 @@ _munin-node-configure()
COMPREPLY=( $( compgen -W '--help --version --debug --config \ COMPREPLY=( $( compgen -W '--help --version --debug --config \
--servicedir --libdir --families --suggest --shell \ --servicedir --libdir --families --suggest --shell \
--remove-also --snmp --snmpversion --snmpcommunity' \ --remove-also --snmp --snmpversion --snmpcommunity' \
-- $cur ) ) -- "$cur" ) )
fi fi
} && } &&
complete -F _munin-node-configure munin-node-configure complete -F _munin-node-configure munin-node-configure

View File

@ -12,7 +12,7 @@ _muttaddr()
_muttquery _muttquery
cur=`_get_cword` cur=`_get_cword`
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -u -- $cur ) ) COMPREPLY=( "${COMPREPLY[@]}" $( compgen -u -- "$cur" ) )
return 0 return 0
} }
@ -50,7 +50,7 @@ _muttaliases()
conffiles=( $(eval _muttconffiles $muttrc $muttrc) ) conffiles=( $(eval _muttconffiles $muttrc $muttrc) )
aliases=( $( sed -rn 's|^alias[[:space:]]+([^[:space:]]+).*$|\1|p' \ aliases=( $( sed -rn 's|^alias[[:space:]]+([^[:space:]]+).*$|\1|p' \
$(eval echo "${conffiles[@]}") ) ) $(eval echo "${conffiles[@]}") ) )
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "${aliases[*]}" -- $cur ) ) COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "${aliases[*]}" -- "$cur" ) )
return 0 return 0
} }
@ -70,7 +70,7 @@ _muttquery()
fi fi
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "${queryresults[*]}" \ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "${queryresults[*]}" \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
} }
@ -112,7 +112,7 @@ _mutt()
-*) -*)
COMPREPLY=( $( compgen -W '-A -a -b -c -e -f -F -H -i -m -n \ COMPREPLY=( $( compgen -W '-A -a -b -c -e -f -F -H -i -m -n \
-p -Q -R -s -v -x -y -z -Z -h' \ -p -Q -R -s -v -x -y -z -Z -h' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
*) *)

View File

@ -14,7 +14,7 @@ _mysqladmin()
case "$prev" in case "$prev" in
-u) -u)
COMPREPLY=( $( compgen -u -- $cur ) ) COMPREPLY=( $( compgen -u -- "$cur" ) )
return 0 return 0
;; ;;
*) *)
@ -22,7 +22,7 @@ _mysqladmin()
esac esac
COMPREPLY=( $( compgen -W '-# -f -? -C -h -p -P -i -r -E -s -S -t -u \ COMPREPLY=( $( compgen -W '-# -f -? -C -h -p -P -i -r -E -s -S -t -u \
-v -V -w' -- $cur ) ) -v -V -w' -- "$cur" ) )
COMPREPLY=( "${COMPREPLY[@]}" \ COMPREPLY=( "${COMPREPLY[@]}" \
$( compgen -W 'create drop extended-status flush-hosts \ $( compgen -W 'create drop extended-status flush-hosts \
@ -30,6 +30,6 @@ _mysqladmin()
flush-threads flush-privileges kill \ flush-threads flush-privileges kill \
password ping processlist reload refresh \ password ping processlist reload refresh \
shutdown status variables version' \ shutdown status variables version' \
-- $cur ) ) -- "$cur" ) )
} && } &&
complete -F _mysqladmin mysqladmin complete -F _mysqladmin mysqladmin

View File

@ -13,7 +13,7 @@ _ncftp()
if [ $COMP_CWORD -eq 1 ] && [ -f ~/.ncftp/bookmarks ]; then if [ $COMP_CWORD -eq 1 ] && [ -f ~/.ncftp/bookmarks ]; then
COMPREPLY=( $( compgen -W '$( sed -ne "s/^\([^,]\{1,\}\),.*$/\1/p" \ COMPREPLY=( $( compgen -W '$( sed -ne "s/^\([^,]\{1,\}\),.*$/\1/p" \
~/.ncftp/bookmarks )' -- $cur ) ) ~/.ncftp/bookmarks )' -- "$cur" ) )
fi fi
return 0 return 0

View File

@ -17,12 +17,12 @@ _mii_tool()
case $prev in case $prev in
-F|--force) -F|--force)
COMPREPLY=( $( compgen -W '100baseTx-FD 100baseTx-HD \ COMPREPLY=( $( compgen -W '100baseTx-FD 100baseTx-HD \
10baseT-FD 10baseT-HD' -- $cur ) ) 10baseT-FD 10baseT-HD' -- "$cur" ) )
return 0 return 0
;; ;;
-A|--advertise) -A|--advertise)
COMPREPLY=( $( compgen -W '100baseT4 100baseTx-FD 100baseTx-HD \ COMPREPLY=( $( compgen -W '100baseT4 100baseTx-FD 100baseTx-HD \
10baseT-FD 10baseT-HD' -- $cur ) ) 10baseT-FD 10baseT-HD' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -32,7 +32,7 @@ _mii_tool()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-v --verbose -V --version -R \ COMPREPLY=( $( compgen -W '-v --verbose -V --version -R \
--reset -r --restart -w --watch -l --log -A \ --reset -r --restart -w --watch -l --log -A \
--advertise -F --force' -- $cur ) ) --advertise -F --force' -- "$cur" ) )
else else
_available_interfaces -a _available_interfaces -a
fi fi
@ -54,7 +54,7 @@ _mii_diag()
-@(F|A|-advertise|-fixed-speed)) -@(F|A|-advertise|-fixed-speed))
COMPREPLY=( $( compgen -W '100baseT4 100baseTx \ COMPREPLY=( $( compgen -W '100baseT4 100baseTx \
100baseTx-FD 100baseTx-HD 10baseT 10baseT-FD \ 100baseTx-FD 100baseTx-HD 10baseT 10baseT-FD \
10baseT-HD' -- $cur ) ) 10baseT-HD' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -66,7 +66,7 @@ _mii_diag()
--all-interfaces -s --status -D --debug -g \ --all-interfaces -s --status -D --debug -g \
--read-parameters -G --set-parameters -M --msg-level \ --read-parameters -G --set-parameters -M --msg-level \
-p --phy -r --restart -R --reset -v -V -w --watch \ -p --phy -r --restart -R --reset -v -V -w --watch \
-? --help' -- $cur ) ) -? --help' -- "$cur" ) )
else else
_available_interfaces -a _available_interfaces -a
fi fi
@ -91,7 +91,7 @@ _route()
COMPREPLY=( $( compgen -W 'add del -host -net netmask metric mss \ COMPREPLY=( $( compgen -W 'add del -host -net netmask metric mss \
window irtt reject mod dyn reinstate dev \ window irtt reject mod dyn reinstate dev \
default gw' -- $cur ) ) default gw' -- "$cur" ) )
COMPREPLY=( $( echo " ${COMP_WORDS[@]}" | \ COMPREPLY=( $( echo " ${COMP_WORDS[@]}" | \
(while read -d ' ' i; do (while read -d ' ' i; do

View File

@ -18,14 +18,14 @@ _ntpdate()
return 0 return 0
;; ;;
-U) -U)
COMPREPLY=( $( compgen -u $cur ) ) COMPREPLY=( $( compgen -u "$cur" ) )
return 0 return 0
;; ;;
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-4 -6 -b -B -d -Q -q -s -u -v -a\ COMPREPLY=( $( compgen -W '-4 -6 -b -B -d -Q -q -s -u -v -a\
-e -k -p -o -r -t' -- $cur ) ) -e -k -p -o -r -t' -- "$cur" ) )
else else
_known_hosts_real "$cur" _known_hosts_real "$cur"
fi fi

View File

@ -6,12 +6,12 @@
have ldapsearch && { have ldapsearch && {
_ldap_uris() _ldap_uris()
{ {
COMPREPLY=( $( compgen -W 'ldap:// ldaps://' -- $cur ) ) COMPREPLY=( $( compgen -W 'ldap:// ldaps://' -- "$cur" ) )
} }
_ldap_protocols() _ldap_protocols()
{ {
COMPREPLY=( $( compgen -W '2 3' -- $cur ) ) COMPREPLY=( $( compgen -W '2 3' -- "$cur" ) )
} }
_ldapsearch() _ldapsearch()
@ -41,12 +41,12 @@ _ldapsearch()
;; ;;
-s) -s)
COMPREPLY=( $( compgen -W 'base one sub children' \ COMPREPLY=( $( compgen -W 'base one sub children' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-a) -a)
COMPREPLY=( $( compgen -W 'never always search find' \ COMPREPLY=( $( compgen -W 'never always search find' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-P) -P)
@ -58,7 +58,7 @@ _ldapsearch()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-n -u -v -t -tt -T -F -A -C -L -LL \ 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 \ -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 ) ) -P -e -E -l -z -O -I -Q -U -R -X -Y -Z -ZZ' -- "$cur" ) )
fi fi
} }
complete -F _ldapsearch ldapsearch complete -F _ldapsearch ldapsearch
@ -96,7 +96,7 @@ _ldapaddmodify()
if [[ ${COMP_WORDS[0]} == ldapmodify ]]; then if [[ ${COMP_WORDS[0]} == ldapmodify ]]; then
options="$options -a" options="$options -a"
fi fi
COMPREPLY=( $( compgen -W "$options" -- $cur ) ) COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
fi fi
} }
complete -F _ldapaddmodify ldapadd ldapmodify complete -F _ldapaddmodify ldapadd ldapmodify
@ -131,7 +131,7 @@ _ldapdelete()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-n -v -c -M -MM -d -f -D -W -w -y \ 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' \ -H -h -P -p -O -U -R -r -x -I -Q -X -Y -Z -ZZ' \
-- $cur ) ) -- "$cur" ) )
fi fi
} }
complete -F _ldapdelete ldapdelete complete -F _ldapdelete ldapdelete
@ -166,7 +166,7 @@ _ldapcompare()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-n -v -z -M -MM -d -D -W -w -y \ 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' \ -H -h -P -p -O -I -Q -U -R -x -X -Y -Z -ZZ' \
-- $cur ) ) -- "$cur" ) )
fi fi
} }
complete -F _ldapcompare ldapcompare complete -F _ldapcompare ldapcompare
@ -201,7 +201,7 @@ _ldapmodrdn()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-r -s -n -v -c -M -MM -d -D -W -w \ 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' \ -y -H -h -P -p -O -I -Q -U -R -x -X -Y -Z -ZZ -f' \
-- $cur ) ) -- "$cur" ) )
fi fi
} }
complete -F _ldapmodrdn ldapmodrdn complete -F _ldapmodrdn ldapmodrdn
@ -235,7 +235,7 @@ _ldapwhoami()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-n -v -z -d -D -W -w -y -H -h -p -P \ 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 ) ) -O -I -Q -U -R -x -X -Y -Z -ZZ' -- "$cur" ) )
fi fi
} }
complete -F _ldapwhoami ldapwhoami complete -F _ldapwhoami ldapwhoami
@ -265,7 +265,7 @@ _ldappasswd()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-A -a -t -d -D -H -h -n -p -S -s -T \ 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 ) ) -v -W -w -y -O -I -Q -U -R -x -X -Y -Z -ZZ' -- "$cur" ) )
fi fi
} }
complete -F _ldappasswd ldappasswd complete -F _ldappasswd ldappasswd

View File

@ -27,7 +27,7 @@ _openssl_sections()
[ ! -f "$config" ] && return 0 [ ! -f "$config" ] && return 0
COMPREPLY=( $( compgen -W "$( awk '/\[.*\]/ {print $2}' $config )" \ COMPREPLY=( $( compgen -W "$( awk '/\[.*\]/ {print $2}' $config )" \
-- $cur ) ) -- "$cur" ) )
} }
_openssl() _openssl()
@ -53,7 +53,7 @@ _openssl()
rc4-40' rc4-40'
if [ $COMP_CWORD -eq 1 ]; then if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
else else
command=${COMP_WORDS[1]} command=${COMP_WORDS[1]}
prev=${COMP_WORDS[COMP_CWORD-1]} prev=${COMP_WORDS[COMP_CWORD-1]}
@ -80,7 +80,7 @@ _openssl()
formats="$formats SMIME" formats="$formats SMIME"
;; ;;
esac esac
COMPREPLY=( $( compgen -W "$formats" -- $cur ) ) COMPREPLY=( $( compgen -W "$formats" -- "$cur" ) )
return 0 return 0
;; ;;
-connect) -connect)
@ -89,12 +89,12 @@ _openssl()
;; ;;
-starttls) -starttls)
COMPREPLY=( $( compgen -W 'smtp pop3 imap ftp' \ COMPREPLY=( $( compgen -W 'smtp pop3 imap ftp' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-cipher) -cipher)
COMPREPLY=( $( compgen -W "$(openssl ciphers | \ COMPREPLY=( $( compgen -W "$(openssl ciphers | \
tr ':' '\n')" -- $cur ) ) tr ':' '\n')" -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -278,7 +278,7 @@ _openssl()
options='-c -d' options='-c -d'
;; ;;
esac esac
COMPREPLY=( $( compgen -W "$options" -- $cur ) ) COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
else else
if [[ "$command" == speed ]]; then if [[ "$command" == speed ]]; then
COMPREPLY=( $( compgen -W 'md2 mdc2 md5 hmac \ COMPREPLY=( $( compgen -W 'md2 mdc2 md5 hmac \
@ -286,7 +286,7 @@ _openssl()
bf-cbc des-cbc des-ede3 rc4 rsa512 \ bf-cbc des-cbc des-ede3 rc4 rsa512 \
rsa1024 rsa2048 rsa4096 dsa512 dsa1024 \ rsa1024 rsa2048 rsa4096 dsa512 dsa1024 \
dsa2048 idea rc2 des rsa blowfish' -- \ dsa2048 idea rc2 des rsa blowfish' -- \
$cur ) ) "$cur" ) )
else else
_filedir _filedir
fi fi

View File

@ -19,16 +19,16 @@ _p4()
text binary resource" text binary resource"
if [ $COMP_CWORD -eq 1 ]; then if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W "$p4commands" -- $cur ) ) COMPREPLY=( $( compgen -W "$p4commands" -- "$cur" ) )
elif [ $COMP_CWORD -eq 2 ]; then elif [ $COMP_CWORD -eq 2 ]; then
case "$prev" in case "$prev" in
help) help)
COMPREPLY=( $( compgen -W "simple commands \ COMPREPLY=( $( compgen -W "simple commands \
environment filetypes jobview revisions \ environment filetypes jobview revisions \
usage views $p4commands" -- $cur ) ) usage views $p4commands" -- "$cur" ) )
;; ;;
admin) admin)
COMPREPLY=( $( compgen -W "checkpoint stop" -- $cur ) ) COMPREPLY=( $( compgen -W "checkpoint stop" -- "$cur" ) )
;; ;;
*) *)
;; ;;
@ -40,7 +40,7 @@ _p4()
case "$prev2" in case "$prev2" in
add|edit|reopen) add|edit|reopen)
COMPREPLY=( $( compgen -W "$p4filetypes" \ COMPREPLY=( $( compgen -W "$p4filetypes" \
-- $cur) ) -- "$cur") )
;; ;;
*) *)
;; ;;

View File

@ -7,7 +7,7 @@ have perl &&
{ {
_perlmodules() _perlmodules()
{ {
COMPREPLY=( $( compgen -P "$prefix" -W "$( perl -e 'sub mods { my ($base,$dir)=@_; return if $base !~ /^\Q$ENV{cur}/; chdir($dir) or return; for (glob(q[*.pm])) {s/\.pm$//; print qq[$base$_\n]}; mods(/^(?:[.\d]+|$Config{archname}-$Config{osname}|auto)$/ ? undef : qq[${base}${_}\\\\:\\\\:],qq[$dir/$_]) for grep {-d} glob(q[*]); } mods(undef,$_) for @INC;' )" -- $cur ) ) COMPREPLY=( $( compgen -P "$prefix" -W "$( perl -e 'sub mods { my ($base,$dir)=@_; return if $base !~ /^\Q$ENV{cur}/; chdir($dir) or return; for (glob(q[*.pm])) {s/\.pm$//; print qq[$base$_\n]}; mods(/^(?:[.\d]+|$Config{archname}-$Config{osname}|auto)$/ ? undef : qq[${base}${_}\\\\:\\\\:],qq[$dir/$_]) for grep {-d} glob(q[*]); } mods(undef,$_) for @INC;' )" -- "$cur" ) )
} }
_perl() _perl()
@ -45,7 +45,7 @@ _perl()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-C -s -T -u -U -W -X -h -v -V -c -w -d \ COMPREPLY=( $( compgen -W '-C -s -T -u -U -W -X -h -v -V -c -w -d \
-D -p -n -a -F -l -0 -I -m -M -P -S -x -i -e ' -- $cur ) ) -D -p -n -a -F -l -0 -I -m -M -P -S -x -i -e ' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -100,18 +100,18 @@ _perldoc()
getnetbyaddr getnetbyname getnetent getprotobyname \ getnetbyaddr getnetbyname getnetent getprotobyname \
getprotobynumber getprotoent getservbyname getservbyport \ getprotobynumber getprotoent getservbyname getservbyport \
getservent sethostent setnetent setprotoent setservent \ getservent sethostent setnetent setprotoent setservent \
gmtime localtime time times' -- $cur ) ) gmtime localtime time times' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h -v -t -u -m -l -F -X -f -q' -- $cur )) COMPREPLY=( $( compgen -W '-h -v -t -u -m -l -F -X -f -q' -- "$cur" ))
else else
# return available modules (unless it is clearly a file) # return available modules (unless it is clearly a file)
if [[ "$cur" != */* ]]; then if [[ "$cur" != */* ]]; then
_perlmodules _perlmodules
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W '$( PAGER=/bin/cat man perl | sed -ne "/perl.*Perl overview/,/perlwin32/p" | awk "\$NF=2 { print \$1}" | grep perl )' -- $cur ) ) COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W '$( PAGER=/bin/cat man perl | sed -ne "/perl.*Perl overview/,/perlwin32/p" | awk "\$NF=2 { print \$1}" | grep perl )' -- "$cur" ) )
fi fi
fi fi
} }

View File

@ -12,6 +12,6 @@ _pineaddr()
cur=`_get_cword` cur=`_get_cword`
COMPREPLY=( $( compgen -W '$( awk "{print \$1}" ~/.addressbook 2>/dev/null)' \ COMPREPLY=( $( compgen -W '$( awk "{print \$1}" ~/.addressbook 2>/dev/null)' \
-- $cur ) ) -- "$cur" ) )
} && } &&
complete -F _pineaddr $default pine complete -F _pineaddr $default pine

View File

@ -38,10 +38,10 @@ _pkg_config()
--exact-version --max-version --list-all --debug \ --exact-version --max-version --list-all --debug \
--print-errors --silence-errors --errors-to-stdout \ --print-errors --silence-errors --errors-to-stdout \
--print-provides --print-requires -? --help --usage' \ --print-provides --print-requires -? --help --usage' \
-- $cur) ) -- "$cur") )
else else
COMPREPLY=( $( compgen -W "$( pkg-config --list-all \ COMPREPLY=( $( compgen -W "$( pkg-config --list-all \
2>/dev/null | awk '{print $1}' )" -- $cur ) ) 2>/dev/null | awk '{print $1}' )" -- "$cur" ) )
fi fi
} && } &&
complete -F _pkg_config pkg-config complete -F _pkg_config pkg-config

View File

@ -16,7 +16,7 @@ _pkg_delete()
[ "$prev" = "-o" -o "$prev" = "-p" -o "$prev" = "-W" ] && return 0 [ "$prev" = "-o" -o "$prev" = "-p" -o "$prev" = "-W" ] && return 0
COMPREPLY=( $( compgen -d $pkgdir$cur ) ) COMPREPLY=( $( compgen -d "$pkgdir$cur" ) )
COMPREPLY=( ${COMPREPLY[@]#$pkgdir} ) COMPREPLY=( ${COMPREPLY[@]#$pkgdir} )
return 0 return 0

View File

@ -14,7 +14,7 @@ _portupgrade()
[ "$prev" = "-l" -o "$prev" = "-L" -o "$prev" = "-o" ] && return 0 [ "$prev" = "-l" -o "$prev" = "-L" -o "$prev" = "-o" ] && return 0
COMPREPLY=( $( compgen -d $pkgdir$cur ) ) COMPREPLY=( $( compgen -d "$pkgdir$cur" ) )
COMPREPLY=( ${COMPREPLY[@]#$pkgdir} ) COMPREPLY=( ${COMPREPLY[@]#$pkgdir} )
COMPREPLY=( ${COMPREPLY[@]%-*} ) COMPREPLY=( ${COMPREPLY[@]%-*} )

View File

@ -20,18 +20,18 @@ _postfix()
return 0 return 0
;; ;;
-D) -D)
COMPREPLY=( $( compgen -W 'start' -- $cur ) ) COMPREPLY=( $( compgen -W 'start' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
if [[ $cur == -* ]]; then if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '-c -D -v' -- $cur ) ) COMPREPLY=( $( compgen -W '-c -D -v' -- "$cur" ) )
return 0 return 0
fi fi
COMPREPLY=( $( compgen -W 'check start stop abort flush reload status \ COMPREPLY=( $( compgen -W 'check start stop abort flush reload status \
set-permissions upgrade-configuration' -- $cur ) ) set-permissions upgrade-configuration' -- "$cur" ) )
} }
complete -F _postfix $filenames postfix complete -F _postfix $filenames postfix
@ -57,12 +57,12 @@ _postmap()
if [[ $cur == -* ]]; then if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '-N -f -i -n -o -p -r -v -w -c -d -q'\ COMPREPLY=( $( compgen -W '-N -f -i -n -o -p -r -v -w -c -d -q'\
-- $cur ) ) -- "$cur" ) )
return 0 return 0
fi fi
if [[ "$cur" == *:* ]]; then if [[ "$cur" == *:* ]]; then
COMPREPLY=( $( compgen -f -- ${cur#*:} ) ) COMPREPLY=( $( compgen -f -- "${cur#*:}" ) )
else else
len=${#cur} len=${#cur}
idx=0 idx=0
@ -98,7 +98,7 @@ _postcat()
esac esac
if [[ $cur == -* ]]; then if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '-c -q -v' -- $cur ) ) COMPREPLY=( $( compgen -W '-c -q -v' -- "$cur" ) )
return 0 return 0
fi fi
@ -151,7 +151,7 @@ _postconf()
if [[ $cur == -* ]]; then if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '-A -a -b -c -d -e -h -m -l -n -t -v'\ COMPREPLY=( $( compgen -W '-A -a -b -c -d -e -h -m -l -n -t -v'\
-- $cur ) ) -- "$cur" ) )
return 0 return 0
fi fi
@ -221,11 +221,11 @@ _postsuper()
esac esac
if [[ $cur == -* ]]; then if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '-c -d -h -H -p -r -s -v' -- $cur ) ) COMPREPLY=( $( compgen -W '-c -d -h -H -p -r -s -v' -- "$cur" ) )
return 0 return 0
fi fi
COMPREPLY=( $( compgen -W 'hold incoming active deferred' -- $cur ) ) COMPREPLY=( $( compgen -W 'hold incoming active deferred' -- "$cur" ) )
} }
complete -F _postsuper $filenames postsuper complete -F _postsuper $filenames postsuper
} }

View File

@ -9,7 +9,7 @@ _pg_databases()
return # See https://launchpad.net/bugs/164772 return # See https://launchpad.net/bugs/164772
COMPREPLY=( $( compgen -W "$( psql -l 2>/dev/null | \ COMPREPLY=( $( compgen -W "$( psql -l 2>/dev/null | \
sed -e '1,/^-/d' -e '/^(/,$d' | \ sed -e '1,/^-/d' -e '/^(/,$d' | \
awk '{print $1}' )" -- $cur ) ) awk '{print $1}' )" -- "$cur" ) )
} }
_pg_users() _pg_users()
@ -18,7 +18,7 @@ _pg_users()
#COMPREPLY=( $( psql -qtc 'select usename from pg_user' template1 2>/dev/null | \ #COMPREPLY=( $( psql -qtc 'select usename from pg_user' template1 2>/dev/null | \
# grep "^ $cur" ) ) # grep "^ $cur" ) )
#[ ${#COMPREPLY[@]} -eq 0 ] && COMPREPLY=( $( compgen -u -- $cur ) ) #[ ${#COMPREPLY[@]} -eq 0 ] && COMPREPLY=( $( compgen -u -- $cur ) )
COMPREPLY=( $( compgen -u -- $cur ) ) COMPREPLY=( $( compgen -u -- "$cur" ) )
} }
# createdb(1) completion # createdb(1) completion
@ -58,7 +58,7 @@ _createdb()
COMPREPLY=( $( compgen -W '-D -T -E -h -p -U -W -e -q \ COMPREPLY=( $( compgen -W '-D -T -E -h -p -U -W -e -q \
--tablespace --template --encoding --host --port \ --tablespace --template --encoding --host --port \
--username --password --echo --quiet --help --version' \ --username --password --echo --quiet --help --version' \
-- $cur )) -- "$cur" ))
else else
_pg_databases _pg_databases
fi fi
@ -97,7 +97,7 @@ _dropdb()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h -p -U -W -i -e -q \ COMPREPLY=( $( compgen -W '-h -p -U -W -i -e -q \
--host --port --username --password --interactive \ --host --port --username --password --interactive \
--echo --quiet --help --version' -- $cur ) ) --echo --quiet --help --version' -- "$cur" ) )
else else
_pg_databases _pg_databases
fi fi
@ -157,7 +157,7 @@ _psql()
-S --single-line -t --tuples-only -T --table-attr \ -S --single-line -t --tuples-only -T --table-attr \
-U --username -v --set --variable -V --version \ -U --username -v --set --variable -V --version \
-W --password -x --expanded -X --no-psqlrc \ -W --password -x --expanded -X --no-psqlrc \
-1 --single-transaction -? --help' -- $cur ) ) -1 --single-transaction -? --help' -- "$cur" ) )
else else
# return list of available databases # return list of available databases
_pg_databases _pg_databases

View File

@ -14,11 +14,11 @@ _python()
case "$prev" in case "$prev" in
-Q) -Q)
COMPREPLY=( $( compgen -W "old new warn warnall" -- $cur ) ) COMPREPLY=( $( compgen -W "old new warn warnall" -- "$cur" ) )
return 0 return 0
;; ;;
-W) -W)
COMPREPLY=( $( compgen -W "ignore default all module once error" -- $cur ) ) COMPREPLY=( $( compgen -W "ignore default all module once error" -- "$cur" ) )
return 0 return 0
;; ;;
-c) -c)
@ -43,7 +43,7 @@ _python()
_filedir '@(py|pyc|pyo)' _filedir '@(py|pyc|pyo)'
else else
COMPREPLY=( $( compgen -W "- -d -E -h -i -O -Q -S -t -u \ COMPREPLY=( $( compgen -W "- -d -E -h -i -O -Q -S -t -u \
-U -v -V -W -x -c" -- $cur ) ) -U -v -V -W -x -c" -- "$cur" ) )
fi fi

View File

@ -22,83 +22,83 @@ _qemu()
return 0 return 0
;; ;;
-boot) -boot)
COMPREPLY=( $( compgen -W 'a c d n' -- $cur ) ) COMPREPLY=( $( compgen -W 'a c d n' -- "$cur" ) )
return 0 return 0
;; ;;
-k) -k)
COMPREPLY=( $( compgen -W 'ar de-ch es fo fr-ca hu ja \ COMPREPLY=( $( compgen -W 'ar de-ch es fo fr-ca hu ja \
mk no pt-br sv da en-gb et fr fr-ch is lt nl pl\ mk no pt-br sv da en-gb et fr fr-ch is lt nl pl\
ru th de en-us fi fr-be hr it lv nl-be pt sl \ ru th de en-us fi fr-be hr it lv nl-be pt sl \
tr' -- $cur ) ) tr' -- "$cur" ) )
return 0 return 0
;; ;;
-soundhw) -soundhw)
COMPREPLY=( $( compgen -W "$( qemu -soundhw ? | awk \ COMPREPLY=( $( compgen -W "$( qemu -soundhw ? | awk \
'/^[[:lower:]]/ {print $1}' ) all" -- $cur ) ) '/^[[:lower:]]/ {print $1}' ) all" -- "$cur" ) )
return 0 return 0
;; ;;
-M) -M)
COMPREPLY=( $( compgen -W "$( qemu -M ? | awk \ COMPREPLY=( $( compgen -W "$( qemu -M ? | awk \
'/^[[:lower:]]/ {print $1}' )" -- $cur ) ) '/^[[:lower:]]/ {print $1}' )" -- "$cur" ) )
return 0 return 0
;; ;;
-cpu) -cpu)
COMPREPLY=( $( compgen -W "$( qemu -cpu ? | awk \ COMPREPLY=( $( compgen -W "$( qemu -cpu ? | awk \
'{print $2}' )" -- $cur ) ) '{print $2}' )" -- "$cur" ) )
return 0 return 0
;; ;;
-usbdevice) -usbdevice)
COMPREPLY=( $( compgen -W 'mouse tablet disk: host: \ COMPREPLY=( $( compgen -W 'mouse tablet disk: host: \
serial: braille net' -- $cur ) ) serial: braille net' -- "$cur" ) )
return 0 return 0
;; ;;
-net) -net)
COMPREPLY=( $( compgen -W 'nic user tap socket vde none dump' \ COMPREPLY=( $( compgen -W 'nic user tap socket vde none dump' \
-- $cur ) ) -- "$cur" ) )
return 0 return 0
;; ;;
-@(serial|parallel|monitor)) -@(serial|parallel|monitor))
COMPREPLY=( $( compgen -W 'vc pty none null /dev/ \ COMPREPLY=( $( compgen -W 'vc pty none null /dev/ \
file: stdio pipe: COM udp: tcp: telnet: unix: \ file: stdio pipe: COM udp: tcp: telnet: unix: \
mon: braille' -- $cur ) ) mon: braille' -- "$cur" ) )
return 0 return 0
;; ;;
-redir) -redir)
COMPREPLY=( $( compgen -S":" -W 'tcp udp' -- $cur ) ) COMPREPLY=( $( compgen -S":" -W 'tcp udp' -- "$cur" ) )
return 0 return 0
;; ;;
-bt) -bt)
COMPREPLY=( $( compgen -W 'hci vhci device' -- $cur ) ) COMPREPLY=( $( compgen -W 'hci vhci device' -- "$cur" ) )
return 0 return 0
;; ;;
-vga) -vga)
COMPREPLY=( $( compgen -W 'cirrus std vmware xenfb none' -- $cur ) ) COMPREPLY=( $( compgen -W 'cirrus std vmware xenfb none' -- "$cur" ) )
return 0 return 0
;; ;;
-drive) -drive)
COMPREPLY=( $( compgen -S"=" -W 'file if bus unit index media \ COMPREPLY=( $( compgen -S"=" -W 'file if bus unit index media \
cyls snapshot cache format serial addr' -- $cur ) ) cyls snapshot cache format serial addr' -- "$cur" ) )
return 0 return 0
;; ;;
-ballon) -ballon)
COMPREPLY=( $( compgen -W 'none virtio' -- $cur ) ) COMPREPLY=( $( compgen -W 'none virtio' -- "$cur" ) )
return 0 return 0
;; ;;
-smbios) -smbios)
COMPREPLY=( $( compgen -W 'file type' -- $cur ) ) COMPREPLY=( $( compgen -W 'file type' -- "$cur" ) )
return 0 return 0
;; ;;
-watchdog) -watchdog)
COMPREPLY=( $( compgen -W "$( qemu -watchdog ? 2>&1 | awk '{print $1}' )" -- $cur ) ) COMPREPLY=( $( compgen -W "$( qemu -watchdog ? 2>&1 | awk '{print $1}' )" -- "$cur" ) )
return 0 return 0
;; ;;
-watchdog-action) -watchdog-action)
COMPREPLY=( $( compgen -W 'reset shutdown poweroff pause \ COMPREPLY=( $( compgen -W 'reset shutdown poweroff pause \
debug none' -- $cur ) ) debug none' -- "$cur" ) )
return 0 return 0
;; ;;
-runas) -runas)
COMPREPLY=( $( compgen -u -- $cur ) ) COMPREPLY=( $( compgen -u -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -118,7 +118,7 @@ _qemu()
-balloon -acpitable -smbios -singlestep -gdb -hdachs -bios \ -balloon -acpitable -smbios -singlestep -gdb -hdachs -bios \
-kernel-kqemu -enable-kqemu -enable-kvm -clock -watchdog \ -kernel-kqemu -enable-kqemu -enable-kvm -clock -watchdog \
-watchdog-action -virtioconsole -show-cursor -tb-size -incoming \ -watchdog-action -virtioconsole -show-cursor -tb-size -incoming \
-chroot -runas' -- $cur ) ) -chroot -runas' -- "$cur" ) )
else else
_filedir _filedir
fi fi

View File

@ -11,18 +11,18 @@ _user_or_group()
# complete on groups if -g was given # complete on groups if -g was given
for (( i=1; i < COMP_CWORD; i++ )); do for (( i=1; i < COMP_CWORD; i++ )); do
if [[ "${COMP_WORDS[i]}" == -g ]]; then if [[ "${COMP_WORDS[i]}" == -g ]]; then
COMPREPLY=( $( compgen -g -- $cur ) ) COMPREPLY=( $( compgen -g -- "$cur" ) )
return 0 return 0
fi fi
done done
# otherwise complete on users # otherwise complete on users
COMPREPLY=( $( compgen -u -- $cur ) ) COMPREPLY=( $( compgen -u -- "$cur" ) )
} }
_quota_formats() _quota_formats()
{ {
COMPREPLY=( $( compgen -W 'vfsold vfsv0 rpc xfs' -- $cur ) ) COMPREPLY=( $( compgen -W 'vfsold vfsv0 rpc xfs' -- "$cur" ) )
} }
_filesystems() _filesystems()
@ -30,7 +30,7 @@ _filesystems()
# Only list filesystems starting with "/", otherwise we also get # Only list filesystems starting with "/", otherwise we also get
#+ "binfmt_misc", "proc", "tmpfs", ... #+ "binfmt_misc", "proc", "tmpfs", ...
COMPREPLY=( $( compgen -W "$(awk '/^\// {print $1}' /etc/mtab)" \ COMPREPLY=( $( compgen -W "$(awk '/^\// {print $1}' /etc/mtab)" \
-- $cur ) ) -- "$cur" ) )
} }
_quota() _quota()
@ -56,7 +56,7 @@ _quota()
COMPREPLY=( $( compgen -W '-F --format -g --group -u --user -v --verbose \ COMPREPLY=( $( compgen -W '-F --format -g --group -u --user -v --verbose \
-s --human-readable -p --raw-grace -i --no-autofs -l --local-only \ -s --human-readable -p --raw-grace -i --no-autofs -l --local-only \
-A --all-nfs -m --no-mixed-pathnames -q --quiet -Q --quiet-refuse \ -A --all-nfs -m --no-mixed-pathnames -q --quiet -Q --quiet-refuse \
-w --no-wrap' -- $cur ) ) -w --no-wrap' -- "$cur" ) )
else else
_user_or_group _user_or_group
fi fi
@ -85,7 +85,7 @@ _setquota()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-r --remote -m --no-mixed-pathnames \ COMPREPLY=( $( compgen -W '-r --remote -m --no-mixed-pathnames \
-F --format -g --group -u --user -p --prototype -b --batch \ -F --format -g --group -u --user -p --prototype -b --batch \
-c --continue-batch -t --edit-period -T --edit-times -a --all' -- $cur ) ) -c --continue-batch -t --edit-period -T --edit-times -a --all' -- "$cur" ) )
else else
_count_args _count_args
@ -128,7 +128,7 @@ _edquota()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-r --remote -m --no-mixed-pathnames \ COMPREPLY=( $( compgen -W '-r --remote -m --no-mixed-pathnames \
-g --group -u --user -p --prototype -F --format -f --filesystem \ -g --group -u --user -p --prototype -F --format -f --filesystem \
-t --edit-period -T --edit-times' -- $cur ) ) -t --edit-period -T --edit-times' -- "$cur" ) )
else else
_user_or_group _user_or_group
fi fi
@ -159,7 +159,7 @@ _quotacheck()
-g --group -u --user -c --create-files -f --force -i \ -g --group -u --user -c --create-files -f --force -i \
--interactive -n --use-first-dquot -M --try-remount -m \ --interactive -n --use-first-dquot -M --try-remount -m \
--no-remount -R --exclude-root -F --format -a --all' \ --no-remount -R --exclude-root -F --format -a --all' \
-- $cur ) ) -- "$cur" ) )
else else
_filesystems _filesystems
fi fi
@ -189,7 +189,7 @@ _repquota()
COMPREPLY=( $( compgen -W '-a --all -v --verbose -s --human-readable \ COMPREPLY=( $( compgen -W '-a --all -v --verbose -s --human-readable \
-c --batch-translation -C --no-batch-translation -t \ -c --batch-translation -C --no-batch-translation -t \
--truncate-names -n --no-names -p --raw-grace -i --no-autofs \ --truncate-names -n --no-names -p --raw-grace -i --no-autofs \
-u --user -g --group -F --format' -- $cur ) ) -u --user -g --group -F --format' -- "$cur" ) )
else else
_filesystems _filesystems
fi fi
@ -217,7 +217,7 @@ _quotaon()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-a --all -v --verbose -u --user \ COMPREPLY=( $( compgen -W '-a --all -v --verbose -u --user \
-g --group -f --off -p --print-state -F --format' -- $cur ) ) -g --group -f --off -p --print-state -F --format' -- "$cur" ) )
else else
_filesystems _filesystems
fi fi
@ -240,7 +240,7 @@ _quotaoff()
return 0 return 0
;; ;;
-@(x|-xfs-command)) -@(x|-xfs-command))
COMPREPLY=( $( compgen -W 'delete enforce' -- $cur ) ) COMPREPLY=( $( compgen -W 'delete enforce' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -250,7 +250,7 @@ _quotaoff()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-a --all -v --verbose -u --user \ COMPREPLY=( $( compgen -W '-a --all -v --verbose -u --user \
-g --group -p --print-state -x --xfs-command -F --format' \ -g --group -p --print-state -x --xfs-command -F --format' \
-- $cur ) ) -- "$cur" ) )
else else
_filesystems _filesystems
fi fi

View File

@ -21,11 +21,11 @@ _rdesktop()
$HOME/.rdesktop/keymaps 2>/dev/null ) ) $HOME/.rdesktop/keymaps 2>/dev/null ) )
COMPREPLY=( ${COMPREPLY[@]:-} $( command ls \ COMPREPLY=( ${COMPREPLY[@]:-} $( command ls \
./keymaps 2>/dev/null ) ) ./keymaps 2>/dev/null ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) ) COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
return 0 return 0
;; ;;
-a) -a)
COMPREPLY=( $( compgen -W '8 15 16 24' -- $cur ) ) COMPREPLY=( $( compgen -W '8 15 16 24' -- "$cur" ) )
return 0 return 0
;; ;;
-x) -x)
@ -36,7 +36,7 @@ _rdesktop()
-r) -r)
# FIXME: should do $nospace for the colon options # FIXME: should do $nospace for the colon options
COMPREPLY=( $( compgen -W 'comport: disk: lptport: \ COMPREPLY=( $( compgen -W 'comport: disk: lptport: \
printer: sound: lspci scard' -- $cur ) ) printer: sound: lspci scard' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -44,7 +44,7 @@ _rdesktop()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-u -d -s -c -p -n -k -g -f -b -L \ COMPREPLY=( $( compgen -W '-u -d -s -c -p -n -k -g -f -b -L \
-A -B -e -E -m -C -D -K -S -T -N -X -a -z -x -P -r \ -A -B -e -E -m -C -D -K -S -T -N -X -a -z -x -P -r \
-0 -4 -5' -- $cur ) ) -0 -4 -5' -- "$cur" ) )
else else
_known_hosts_real "$cur" _known_hosts_real "$cur"
fi fi

View File

@ -16,7 +16,7 @@ _repomanage()
if [[ "$cur" == -* ]] ; then if [[ "$cur" == -* ]] ; then
COMPREPLY=( $( compgen -W '-o --old -n --new -s --space -k \ COMPREPLY=( $( compgen -W '-o --old -n --new -s --space -k \
--keep -c --nocheck -h --help' -- $cur ) ) --keep -c --nocheck -h --help' -- "$cur" ) )
else else
_filedir -d _filedir -d
fi fi

View File

@ -19,30 +19,30 @@ _reportbug()
;; ;;
-B|--bts) -B|--bts)
COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \ COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \
$cur )) "$cur" ))
return 0 return 0
;; ;;
-e|--editor|--mua) -e|--editor|--mua)
COMP_WORDS=(COMP_WORDS[0] $cur) COMP_WORDS=(COMP_WORDS[0] "$cur")
COMP_CWORD=1 COMP_CWORD=1
_command _command
return 0 return 0
;; ;;
--mode) --mode)
COMPREPLY=( $( compgen -W "novice standard expert" -- $cur ) ) COMPREPLY=( $( compgen -W "novice standard expert" -- "$cur" ) )
return 0 return 0
;; ;;
-S|--severity) -S|--severity)
COMPREPLY=( $( compgen -W "grave serious important normal \ COMPREPLY=( $( compgen -W "grave serious important normal \
minor wishlist" -- $cur ) ) minor wishlist" -- "$cur" ) )
return 0 return 0
;; ;;
-u|--ui|--interface) -u|--ui|--interface)
COMPREPLY=( $( compgen -W "newt text gnome" -- $cur ) ) COMPREPLY=( $( compgen -W "newt text gnome" -- "$cur" ) )
return 0 return 0
;; ;;
-t|--type) -t|--type)
COMPREPLY=( $( compgen -W "gnats debbugs" -- $cur ) ) COMPREPLY=( $( compgen -W "gnats debbugs" -- "$cur" ) )
return 0 return 0
;; ;;
-T|--tags) -T|--tags)
@ -51,7 +51,7 @@ _reportbug()
lenny lenny-ignore sid experimental confirmed \ lenny lenny-ignore sid experimental confirmed \
d-i fixed fixed-in-experimental fixed-upstream \ d-i fixed fixed-in-experimental fixed-upstream \
help l10n moreinfo patch pending security \ help l10n moreinfo patch pending security \
unreproducible upstream wontfix ipv6 lfs" -- $cur )) unreproducible upstream wontfix ipv6 lfs" -- "$cur" ))
return 0 return 0
;; ;;
*) *)
@ -76,8 +76,8 @@ _reportbug()
listarchives lists.debian.org mirrors nm.debian.org \ listarchives lists.debian.org mirrors nm.debian.org \
press project qa.debian.org release-notes \ press project qa.debian.org release-notes \
security.debian.org tech-ctte upgrade-reports \ security.debian.org tech-ctte upgrade-reports \
www.debian.org' -- $cur ) \ www.debian.org' -- "$cur" ) \
$( apt-cache pkgnames -- $cur 2> /dev/null) ) $( apt-cache pkgnames -- "$cur" 2> /dev/null) )
_filedir _filedir
return 0 return 0
} && } &&
@ -97,11 +97,11 @@ _querybts()
case "$prev" in case "$prev" in
-B|--bts) -B|--bts)
COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \ COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \
$cur )) "$cur" ))
return 0 return 0
;; ;;
-u|--ui|--interface) -u|--ui|--interface)
COMPREPLY=($( compgen -W "newt text gnome" -- $cur )) COMPREPLY=($( compgen -W "newt text gnome" -- "$cur" ))
return 0 return 0
;; ;;
esac esac
@ -116,7 +116,7 @@ _querybts()
listarchives lists.debian.org mirrors nm.debian.org \ listarchives lists.debian.org mirrors nm.debian.org \
press project qa.debian.org release-notes \ press project qa.debian.org release-notes \
security.debian.org tech-ctte upgrade-reports \ security.debian.org tech-ctte upgrade-reports \
www.debian.org' -- $cur ) \ www.debian.org' -- "$cur" ) \
$( apt-cache pkgnames -- $cur 2> /dev/null) ) $( apt-cache pkgnames -- "$cur" 2> /dev/null) )
} && } &&
complete -F _querybts $filenames querybts complete -F _querybts $filenames querybts

View File

@ -20,7 +20,7 @@ _resolvconf()
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-a -d -u' -- $cur ) ) COMPREPLY=( $( compgen -W '-a -d -u' -- "$cur" ) )
fi fi
} && } &&
complete -F _resolvconf resolvconf complete -F _resolvconf resolvconf

View File

@ -12,12 +12,12 @@ _rfkill()
cur=`_get_cword` cur=`_get_cword`
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--version' -- $cur ) ) COMPREPLY=( $( compgen -W '--version' -- "$cur" ) )
else else
case $COMP_CWORD in case $COMP_CWORD in
1) 1)
COMPREPLY=( $( compgen -W "help event list \ COMPREPLY=( $( compgen -W "help event list \
block unblock" -- $cur ) ) block unblock" -- "$cur" ) )
;; ;;
2) 2)
prev=${COMP_WORDS[COMP_CWORD-1]} prev=${COMP_WORDS[COMP_CWORD-1]}
@ -26,7 +26,7 @@ _rfkill()
"$(rfkill list | awk -F: \ "$(rfkill list | awk -F: \
'/^[0-9]/ {print $1}') \ '/^[0-9]/ {print $1}') \
all wifi bluetooth uwb wimax \ all wifi bluetooth uwb wimax \
wwan gps" -- $cur ) ) wwan gps" -- "$cur" ) )
fi fi
;; ;;
esac esac

View File

@ -1,32 +1,4 @@
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- _path ${classes[@]} | ruby -ane 'if /^-/.../^-/ and \
# ex: ts=8 sw=8 noet filetype=sh
#
# ri completion for Ruby documentation by Ian Macdonald <ian@caliban.org>
have ri && {
ri_get_methods()
{
local regex
if [ "$ri_version" = integrated ]; then
if [ -z "$separator" ]; then
regex="(Instance|Class)"
elif [ "$separator" = "#" ]; then
regex=Instance
else
regex=Class
fi
COMPREPLY=( ${COMPREPLY[@]} \
"$( ri ${classes[@]} 2>/dev/null | \
ruby -ane 'if /^'"$regex"' methods:/.../^------------------|^$/ and \
/^ / then print $_.split(/, |,$/).grep(/^[^\[]*$/).join("\n"); \
end' | sort -u )" )
else
# older versions of ri didn't distinguish between class/module and
# instance methods
COMPREPLY=( ${COMPREPLY[@]} \
"$( ruby -W0 $ri_path ${classes[@]} | ruby -ane 'if /^-/.../^-/ and \
! /^-/ and ! /^ +(class|module): / then \ ! /^-/ and ! /^ +(class|module): / then \
print $_.split(/, |,$| +/).grep(/^[^\[]*$/).join("\n"); \ print $_.split(/, |,$| +/).grep(/^[^\[]*$/).join("\n"); \
end' | sort -u )" ) end' | sort -u )" )
@ -77,7 +49,7 @@ _ri()
if /^ .*[A-Z]/ then print; end; end' )) if /^ .*[A-Z]/ then print; end; end' ))
fi fi
COMPREPLY=( $( compgen -W '${classes[@]}' -- $cur ) ) COMPREPLY=( $( compgen -W '${classes[@]}' -- "$cur" ) )
if [[ "$cur" == [A-Z]* ]]; then if [[ "$cur" == [A-Z]* ]]; then
# we're completing on class or module alone # we're completing on class or module alone
return 0 return 0

View File

@ -18,7 +18,7 @@ _rpcdebug_flags()
if [ -n "$module" ]; then if [ -n "$module" ]; then
COMPREPLY=( $( compgen -W "$(rpcdebug -vh 2>&1 \ COMPREPLY=( $( compgen -W "$(rpcdebug -vh 2>&1 \
| grep '^'$module' '\ | grep '^'$module' '\
| awk '{$1 = ""; print $0}')" -- $cur ) ) | awk '{$1 = ""; print $0}')" -- "$cur" ) )
fi fi
} }
@ -40,13 +40,13 @@ _rpcdebug()
return 0 return 0
;; ;;
-m) -m)
COMPREPLY=( $( compgen -W 'rpc nfs nfsd nlm' -- $cur ) ) COMPREPLY=( $( compgen -W 'rpc nfs nfsd nlm' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-v -h -m -s -c' -- $cur ) ) COMPREPLY=( $( compgen -W '-v -h -m -s -c' -- "$cur" ) )
fi fi
} }
complete -F _rpcdebug rpcdebug complete -F _rpcdebug rpcdebug

View File

@ -26,7 +26,7 @@ _rpm_groups()
# http://lists.alioth.debian.org/pipermail/bash-completion-devel/2009-May/001486.html # http://lists.alioth.debian.org/pipermail/bash-completion-devel/2009-May/001486.html
local IFS=$'\n' local IFS=$'\n'
COMPREPLY=( $( compgen -W "$( rpm -qa $nodig $nosig --queryformat \ COMPREPLY=( $( compgen -W "$( rpm -qa $nodig $nosig --queryformat \
'%{group}\n' )" -- $cur ) ) '%{group}\n' )" -- "$cur" ) )
} }
_rpm_nodigsig() _rpm_nodigsig()
@ -64,11 +64,11 @@ _rpm()
case "$cur" in case "$cur" in
-b*) -b*)
COMPREPLY=( $( compgen -W '-ba -bb -bc -bi -bl -bp -bs'\ COMPREPLY=( $( compgen -W '-ba -bb -bc -bi -bl -bp -bs'\
-- $cur ) ) -- "$cur" ) )
;; ;;
-t*) -t*)
COMPREPLY=( $( compgen -W '-ta -tb -tc -ti -tl -tp -ts'\ COMPREPLY=( $( compgen -W '-ta -tb -tc -ti -tl -tp -ts'\
-- $cur ) ) -- "$cur" ) )
;; ;;
--*) --*)
COMPREPLY=( $( compgen -W '--help --version --initdb \ COMPREPLY=( $( compgen -W '--help --version --initdb \
@ -76,11 +76,11 @@ _rpm()
--rebuilddb --showrc --setperms --setugids --tarbuild \ --rebuilddb --showrc --setperms --setugids --tarbuild \
--eval --install --upgrade --query --freshen --erase \ --eval --install --upgrade --query --freshen --erase \
--verify --querytags --rmsource --rmspec --clean \ --verify --querytags --rmsource --rmspec --clean \
--import' -- $cur ) ) --import' -- "$cur" ) )
;; ;;
*) *)
COMPREPLY=( $( compgen -W '-b -e -E -F -i -q -t -U -V' \ COMPREPLY=( $( compgen -W '-b -e -E -F -i -q -t -U -V' \
-- $cur ) ) -- "$cur" ) )
;; ;;
esac esac
@ -100,7 +100,7 @@ _rpm()
return 0 return 0
;; ;;
--pipe) --pipe)
COMPREPLY=( $( compgen -c -- $cur ) ) COMPREPLY=( $( compgen -c -- "$cur" ) )
return 0 return 0
;; ;;
--rcfile) --rcfile)
@ -120,7 +120,7 @@ _rpm()
local IFS=$'\n' local IFS=$'\n'
COMPREPLY=( $( compgen -W "$( rpm -qa $nodig $nosig \ COMPREPLY=( $( compgen -W "$( rpm -qa $nodig $nosig \
--queryformat='%{providename}\n' )" \ --queryformat='%{providename}\n' )" \
-- $cur ) ) -- "$cur" ) )
fi fi
return 0 return 0
;; ;;
@ -132,13 +132,13 @@ _rpm()
local IFS=$'\n' local IFS=$'\n'
COMPREPLY=( $( compgen -W "$( rpm -qa $nodig $nosig \ COMPREPLY=( $( compgen -W "$( rpm -qa $nodig $nosig \
--queryformat='%{requirename}\n' )" \ --queryformat='%{requirename}\n' )" \
-- $cur ) ) -- "$cur" ) )
fi fi
return 0 return 0
;; ;;
--target) --target)
COMPREPLY=( $( compgen -W "$( command rpm --showrc | sed -ne \ COMPREPLY=( $( compgen -W "$( command rpm --showrc | sed -ne \
's/^\s*compatible\s\+build\s\+archs\s*:\s*\(.*\)/\1/ p' )" -- $cur ) ) 's/^\s*compatible\s\+build\s\+archs\s*:\s*\(.*\)/\1/ p' )" -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -154,7 +154,7 @@ _rpm()
--noorder --relocate --badreloc --notriggers \ --noorder --relocate --badreloc --notriggers \
--excludepath --ignoresize --oldpackage --define \ --excludepath --ignoresize --oldpackage --define \
--eval --pipe --queryformat --repackage --nosuggests \ --eval --pipe --queryformat --repackage --nosuggests \
--nodigest --nosignature' -- $cur ) ) --nodigest --nosignature' -- "$cur" ) )
else else
_filedir 'rpm' _filedir 'rpm'
fi fi
@ -162,7 +162,7 @@ _rpm()
-@(e|-erase)) -@(e|-erase))
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--allmatches --noscripts \ COMPREPLY=( $( compgen -W '--allmatches --noscripts \
--notriggers --nodeps --test --repackage' -- $cur ) ) --notriggers --nodeps --test --repackage' -- "$cur" ) )
else else
_rpm_installed_packages "$nodig" "$nosig" _rpm_installed_packages "$nodig" "$nosig"
fi fi
@ -181,7 +181,7 @@ _rpm()
--conflicts --obsoletes \ --conflicts --obsoletes \
--nodigest --nosignature \ --nodigest --nosignature \
--suggests --enhances \ --suggests --enhances \
--triggerscripts' -- $cur ) ) --triggerscripts' -- "$cur" ) )
else else
_filedir _filedir
fi fi
@ -198,7 +198,7 @@ _rpm()
--define --eval --pipe --showrc --info --list \ --define --eval --pipe --showrc --info --list \
--state --docfiles --configfiles --queryformat\ --state --docfiles --configfiles --queryformat\
--conflicts --obsoletes --nodigest \ --conflicts --obsoletes --nodigest \
--nosignature' -- $cur ) ) --nosignature' -- "$cur" ) )
else else
_filedir 'rpm' _filedir 'rpm'
fi fi
@ -215,7 +215,7 @@ _rpm()
--docfiles --configfiles --queryformat \ --docfiles --configfiles --queryformat \
--conflicts --obsoletes --pkgid --hdrid \ --conflicts --obsoletes --pkgid --hdrid \
--fileid --tid --nodigest --nosignature \ --fileid --tid --nodigest --nosignature \
--triggerscripts' -- $cur ) ) --triggerscripts' -- "$cur" ) )
elif [ "${COMP_LINE#* -*([^ -])a}" == "$COMP_LINE" ]; then elif [ "${COMP_LINE#* -*([^ -])a}" == "$COMP_LINE" ]; then
_rpm_installed_packages "$nodig" "$nosig" _rpm_installed_packages "$nodig" "$nosig"
fi fi
@ -224,7 +224,7 @@ _rpm()
-@(K*|-checksig)) -@(K*|-checksig))
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--nopgp --nogpg --nomd5 \ COMPREPLY=( $( compgen -W '--nopgp --nogpg --nomd5 \
--nodigest --nosignature' -- $cur ) ) --nodigest --nosignature' -- "$cur" ) )
else else
_filedir 'rpm' _filedir 'rpm'
fi fi
@ -235,7 +235,7 @@ _rpm()
--nodeps --nogroup --nolinkto --nomode --nomtime \ --nodeps --nogroup --nolinkto --nomode --nomtime \
--nordev --nouser --nofiles --noscripts --nomd5 \ --nordev --nouser --nofiles --noscripts --nomd5 \
--querytags --specfile --whatrequires --whatprovides \ --querytags --specfile --whatrequires --whatprovides \
--nodigest --nosignature' -- $cur ) ) --nodigest --nosignature' -- "$cur" ) )
# check whether we're doing file completion # check whether we're doing file completion
elif [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then elif [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then
_filedir _filedir
@ -251,7 +251,7 @@ _rpm()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--short-circuit --timecheck \ COMPREPLY=( $( compgen -W '--short-circuit --timecheck \
--clean --rmsource --rmspec --test --sign --buildroot \ --clean --rmsource --rmspec --test --sign --buildroot \
--target --nobuild --nodeps --nodirtokens' -- $cur ) ) --target --nobuild --nodeps --nodirtokens' -- "$cur" ) )
elif [[ ${COMP_WORDS[1]} == -b* ]]; then elif [[ ${COMP_WORDS[1]} == -b* ]]; then
_filedir 'spec' _filedir 'spec'
else else
@ -261,7 +261,7 @@ _rpm()
--re@(build|compile)) --re@(build|compile))
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--nodeps --rmsource \ COMPREPLY=( $( compgen -W '--nodeps --rmsource \
--rmspec --sign --nodirtokens --target' -- $cur ) ) --rmspec --sign --nodirtokens --target' -- "$cur" ) )
else else
_filedir '?(no)src.rpm' _filedir '?(no)src.rpm'
fi fi
@ -278,7 +278,7 @@ _rpm()
--@(clean|rms@(ource|pec))) --@(clean|rms@(ource|pec)))
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--clean --rmsource \ COMPREPLY=( $( compgen -W '--clean --rmsource \
--rmspec' -- $cur ) ) --rmspec' -- "$cur" ) )
else else
_filedir 'spec' _filedir 'spec'
fi fi
@ -286,7 +286,7 @@ _rpm()
--@(import|dbpath|root)) --@(import|dbpath|root))
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--import --dbpath --root' \ COMPREPLY=( $( compgen -W '--import --dbpath --root' \
-- $cur ) ) -- "$cur" ) )
else else
_filedir _filedir
fi fi

View File

@ -22,7 +22,7 @@ _rpmcheck()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-explain -failures -successes \ COMPREPLY=( $( compgen -W '-explain -failures -successes \
-dump -dump-all -base -help -compressed-input' \ -dump -dump-all -base -help -compressed-input' \
-- $cur ) ) -- "$cur" ) )
else else
_filedir _filedir
fi fi

View File

@ -9,6 +9,6 @@ _rrdtool ()
cur=`_get_cword` cur=`_get_cword`
COMPREPLY=( $( compgen -W 'create update updatev graph dump \ COMPREPLY=( $( compgen -W 'create update updatev graph dump \
restore last lastupdate first info \ restore last lastupdate first info \
fetch tune resize xport' -- $cur ) ) fetch tune resize xport' -- "$cur" ) )
} && } &&
complete -F _rrdtool rrdtool complete -F _rrdtool rrdtool

View File

@ -26,7 +26,7 @@ _rsync()
return 0 return 0
;; ;;
-@(e|-rsh)) -@(e|-rsh))
COMPREPLY=( $( compgen -W 'rsh ssh' -- $cur ) ) COMPREPLY=( $( compgen -W 'rsh ssh' -- "$cur" ) )
return 0 return 0
;; ;;
esac esac
@ -54,7 +54,7 @@ _rsync()
--address= --config= --port= --blocking-io \ --address= --config= --port= --blocking-io \
--no-blocking-io --stats --progress \ --no-blocking-io --stats --progress \
--log-format= --password-file= --bwlimit= \ --log-format= --password-file= --bwlimit= \
--write-batch= --read-batch= --help' -- $cur )) --write-batch= --read-batch= --help' -- "$cur" ))
;; ;;
*:*) *:*)
# find which remote shell is used # find which remote shell is used

Some files were not shown because too many files have changed in this diff Show More