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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@ _cksfv()
cur=`_get_cword`
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
fi

View File

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

View File

@ -15,13 +15,13 @@ _cowsay()
case $prev in
-f)
COMPREPLY=( $( compgen -W '$( cowsay -l | tail -n +2 \
)' -- $cur ) )
)' -- "$cur" ) )
return 0
;;
esac
# 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

View File

@ -6,7 +6,7 @@
have cpio && {
_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()
@ -34,7 +34,7 @@ _cpio()
return 0
;;
--rsh-command)
COMPREPLY=( $( compgen -c -- $cur ) )
COMPREPLY=( $( compgen -c -- "$cur" ) )
return 0
;;
esac
@ -42,7 +42,7 @@ _cpio()
$split && return 0
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
case ${COMP_WORDS[1]} in
-@(o|-create))
@ -53,7 +53,7 @@ _cpio()
--verbose --dot --append --block-size\
--dereference --io-size --quiet\
--force-local --rsh-command --help\
--version' -- $cur ) )
--version' -- "$cur" ) )
fi
;;
-@(i|-extract))
@ -72,7 +72,7 @@ _cpio()
--force-local --no-absolute-filenames\
--sparse --only-verify-crc --quiet\
--rsh-command --help\
--version' -- $cur ) )
--version' -- "$cur" ) )
fi
;;
-@(p|-pass-through))
@ -84,7 +84,7 @@ _cpio()
--unconditional --verbose --dot\
--dereference --owner\
--no-preserve-owner --sparse --help\
--version' -- $cur ) )
--version' -- "$cur" ) )
else
_filedir -d
fi

View File

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

View File

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

View File

@ -21,15 +21,15 @@ _dd()
cur=${cur#*=}
COMPREPLY=( $( compgen -W 'ascii ebcdic ibm block unblock \
lcase notrunc ucase swab noerror sync' \
-- $cur ) )
-- "$cur" ) )
return 0
;;
esac
_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'\
-S '=' -- $cur ) )
-S '=' -- "$cur" ) )
} &&
complete -F _dd $nospace $filenames dd

View File

@ -24,7 +24,7 @@ have dhclient && _dhclient()
if [[ "$cur" == -* ]]; then
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
_available_interfaces
fi

View File

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

View File

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

View File

@ -26,7 +26,7 @@ _arpspoof()
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -t' -- $cur ) )
COMPREPLY=( $( compgen -W '-i -t' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi
@ -57,7 +57,7 @@ _dnsspoof()
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -f' -- $cur ) )
COMPREPLY=( $( compgen -W '-i -f' -- "$cur" ) )
fi
} &&
@ -87,7 +87,7 @@ _dsniff()
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-c -d -m -n -i -s -f -t \
-r -w' -- $cur ) )
-r -w' -- "$cur" ) )
fi
} &&
@ -112,7 +112,7 @@ _snarf()
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -v' -- $cur ) )
COMPREPLY=( $( compgen -W '-i -v' -- "$cur" ) )
fi
} &&
@ -138,7 +138,7 @@ _macof()
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
} &&
@ -155,7 +155,7 @@ _sshmitm()
cur=`_get_cword`
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d -I -p' -- $cur ) )
COMPREPLY=( $( compgen -W '-d -I -p' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi
@ -182,7 +182,7 @@ _sshow()
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d -i' -- $cur ) )
COMPREPLY=( $( compgen -W '-d -i' -- "$cur" ) )
fi
} &&
@ -207,7 +207,7 @@ _tcpkill()
esac
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
} &&
@ -232,7 +232,7 @@ _tcpnice()
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-A -I -M -i' -- $cur ) )
COMPREPLY=( $( compgen -W '-A -I -M -i' -- "$cur" ) )
fi
} &&
@ -257,7 +257,7 @@ _urlsnarf()
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-n -i -v' -- $cur ) )
COMPREPLY=( $( compgen -W '-n -i -v' -- "$cur" ) )
fi
} &&
@ -274,7 +274,7 @@ _webmitm()
cur=`_get_cword`
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d' -- $cur ) )
COMPREPLY=( $( compgen -W '-d' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi

View File

@ -16,7 +16,7 @@ _find()
case "$prev" in
-@(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
;;
-?(a|c)newer|-fls|-fprint?(0|f)|-?(i)?(l)name|-?(i)wholename)
@ -26,7 +26,7 @@ _find()
-fstype)
# this is highly non-portable
[ -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
;;
-gid)
@ -40,7 +40,7 @@ _find()
return 0
;;
-?(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
;;
-uid)
@ -48,11 +48,11 @@ _find()
return 0
;;
-user)
COMPREPLY=( $( compgen -u -- $cur ) )
COMPREPLY=( $( compgen -u -- "$cur" ) )
return 0
;;
-exec|-ok)
COMP_WORDS=(COMP_WORDS[0] $cur)
COMP_WORDS=(COMP_WORDS[0] "$cur")
COMP_CWORD=1
_command
return 0
@ -86,7 +86,7 @@ _find()
-links -lname -mmin -mtime -name -newer -nouser \
-nogroup -perm -regex -size -true -type -uid -used \
-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
# 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\
--debug --file --gamelog --help --info --log --meta \
--Metaserver --port --quitidle --read --version' \
-- $cur ) )
-- "$cur" ) )
fi
} &&
@ -46,7 +46,7 @@ _civclient()
return 0
;;
-@(P|-Plugin))
COMPREPLY=( $( compgen -W 'none esd sdl' -- $cur ) )
COMPREPLY=( $( compgen -W 'none esd sdl' -- "$cur" ) )
return 0
;;
-@(s|-server))
@ -59,7 +59,7 @@ _civclient()
COMPREPLY=( $( compgen -W '-a -d -h -l -m -n -p -P -s -S -t -v\
--autoconnect --debug --help --log --meta --name \
--port --Plugin --server --Sound --tiles --version' \
-- $cur ) )
-- "$cur" ) )
fi
} &&

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -33,7 +33,7 @@ _gpg()
if [[ "$cur" == -* ]]; then
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
} &&

View File

@ -37,7 +37,7 @@ _gpg2 ()
if [[ "$cur" == -* ]]; then
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
} &&
complete -F _gpg2 $default gpg2

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@ _ipmitool()
case "$prev" in
-I)
COMPREPLY=( $( compgen -W 'open imb lan lanplus free' \
-- $cur ) )
-- "$cur" ) )
return 0
;;
esac
@ -24,12 +24,12 @@ _ipmitool()
if [[ "$cur" == -* ]]; then
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' \
-- $cur ) )
-- "$cur" ) )
else
COMPREPLY=( $( compgen -W 'raw i2c spd lan chassis power event \
mc sdr sensor fru gendev sel pef sol tsol isol user \
channel session sunoem kontronoem picmg fwum firewall \
exec set hpm ekanalyzer' -- $cur ) )
exec set hpm ekanalyzer' -- "$cur" ) )
fi
} &&

View File

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

View File

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

View File

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

View File

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

View File

@ -14,7 +14,7 @@ _kldload()
[ -d $moddir ] || moddir=/boot/kernel/
cur=`_get_cword`
COMPREPLY=( $( compgen -f $moddir$cur ) )
COMPREPLY=( $( compgen -f "$moddir$cur" ) )
COMPREPLY=( ${COMPREPLY[@]#$moddir} )
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 \
patch-set-web update-distributions distribution-name notify my-notifier \
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
return 0

View File

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

View File

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

View File

@ -7,7 +7,7 @@ have lilo && {
_lilo_labels()
{
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()
@ -41,7 +41,7 @@ _lilo()
-T)
# topic completion
COMPREPLY=( $( compgen -W 'help ChRul EBDA geom geom= \
table= video' -- $cur ) )
table= video' -- "$cur" ) )
return 0
;;
esac
@ -50,7 +50,7 @@ _lilo()
# relevant options completion
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' -- \
$cur ) )
"$cur" ) )
fi
}
complete -F _lilo lilo

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -23,10 +23,10 @@ _mdadm_raid_level()
case $mode in
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)
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
}
@ -43,10 +43,10 @@ _mdadm_raid_layout()
case $level in
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)
COMPREPLY=( $( compgen -W 'n o p' -- $cur ) )
COMPREPLY=( $( compgen -W 'n o p' -- "$cur" ) )
;;
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 ) )
@ -56,12 +56,12 @@ _mdadm_raid_layout()
_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()
{
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 [[ $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
case ${COMP_WORDS[COMP_CWORD-1]} in
-@(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))
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))
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))
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
fi

View File

@ -14,7 +14,7 @@ _minicom()
case $prev in
-@(a|c))
COMPREPLY=( $( compgen -W 'on off' -- $cur ) )
COMPREPLY=( $( compgen -W 'on off' -- "$cur" ) )
return 0
;;
-@(S|C))
@ -23,7 +23,7 @@ _minicom()
;;
-P)
COMPREPLY=( $( command ls /dev/tty* ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}' -- $cur ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}' -- "$cur" ) )
return 0
;;
esac
@ -31,14 +31,14 @@ _minicom()
if [[ "$cur" == -* ]]; then
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
else
[ -n "$( command ls /etc/minirc.* 2>/dev/null)" ] && confdir=/etc
[ -n "$( command ls /etc/minicom/minirc.* 2>/dev/null)" ] && confdir=/etc/minicom
if [ -n "$confdir" ]; then
COMPREPLY=( $( compgen -W '$( command ls $confdir/minirc.* | \
sed -e "s|$confdir/minirc.||")' -- $cur ) )
sed -e "s|$confdir/minirc.||")' -- "$cur" ) )
return 0
fi
fi

View File

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

View File

@ -50,11 +50,11 @@ _mock()
# (e.g. ix86 chroot builds in x86_64 mock host)
# This would actually depend on what the target root
# 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
;;
--@(en|dis)able-plugin)
COMPREPLY=( $( compgen -W "$plugins" -- $cur ) )
COMPREPLY=( $( compgen -W "$plugins" -- "$cur" ) )
return 0
;;
esac
@ -71,7 +71,7 @@ _mock()
--configdir --rpmbuild_timeout --unpriv --cwd --spec \
--sources -v --verbose -q --quiet --trace \
--enable-plugin --disable-plugin --print-root-path' \
-- $cur ) )
-- "$cur" ) )
else
_filedir '?(no)src.rpm'
fi

View File

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

View File

@ -9,7 +9,7 @@ _mplayer_options_list()
cur=${cur%\\}
COMPREPLY=( $( compgen -W "$( $1 $2 help 2>/dev/null | \
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()
@ -108,7 +108,7 @@ _mplayer()
;;
-lavdopts)
COMPREPLY=( $( compgen -W 'ec er= bug= idct= gray' \
-- $cur ) )
-- "$cur" ) )
return 0
;;
-lavcopts)
@ -128,22 +128,22 @@ _mplayer()
format= pred qpel precmp= cmp= \
subcmp= predia= dia= trell last_pred= \
preme= subq= psnr mpeg_quant aic umv' \
-- $cur ) )
-- "$cur" ) )
return 0
;;
-ssf)
COMPREPLY=( $( compgen -W 'lgb= cgb= ls= cs= chs= \
cvs=' -- $cur ) )
cvs=' -- "$cur" ) )
return 0
;;
-jpeg)
COMPREPLY=( $( compgen -W 'noprogressive progressive \
nobaseline baseline optimize= \
smooth= quality= outdir=' -- $cur ) )
smooth= quality= outdir=' -- "$cur" ) )
return 0
;;
-xvidopts)
COMPREPLY=( $( compgen -W 'dr2 nodr2' -- $cur ) )
COMPREPLY=( $( compgen -W 'dr2 nodr2' -- "$cur" ) )
return 0
;;
-xvidencopts)
@ -155,7 +155,7 @@ _mplayer()
max_key_interval= mpeg_quant \
mod_quant lumi_mask hintedme \
hintfile debug keyframe_boost= \
kfthreshold= kfreduction=' -- $cur ) )
kfthreshold= kfreduction=' -- "$cur" ) )
return 0
;;
-divx4opts)
@ -163,35 +163,35 @@ _mplayer()
min_quant= max_quant= rc_period= \
rc_reaction_period= crispness= \
rc_reaction_ratio= pass= vbrpass= \
help' -- $cur ) )
help' -- "$cur" ) )
return 0
;;
-info)
COMPREPLY=( $( compgen -W 'name= artist= genre= \
subject= copyright= srcform= \
comment= help' -- $cur ) )
comment= help' -- "$cur" ) )
return 0
;;
-lameopts)
COMPREPLY=( $( compgen -W 'vbr= abr cbr br= q= aq= \
ratio= vol= mode= padding= fast \
preset= help' -- $cur ) )
preset= help' -- "$cur" ) )
return 0
;;
-rawaudio)
COMPREPLY=( $( compgen -W 'on channels= rate= \
samplesize= format=' -- $cur ) )
samplesize= format=' -- "$cur" ) )
return 0
;;
-rawvideo)
COMPREPLY=( $( compgen -W 'on fps= sqcif qcif cif \
4cif pal ntsc w= h= y420 yv12 yuy2 \
y8 format= size=' -- $cur ) )
y8 format= size=' -- "$cur" ) )
return 0
;;
-aop)
COMPREPLY=( $( compgen -W 'list= delay= format= fout= \
volume= mul= softclip' -- $cur ) )
volume= mul= softclip' -- "$cur" ) )
return 0
;;
-dxr2)
@ -204,7 +204,7 @@ _mplayer()
ck-bmax= ck-r= ck-g= ck-b= \
ignore-cache= ol-osd= olh-cor= \
olw-cor= olx-cor= oly-cor= overlay \
overlay-ratio= update-cache' -- $cur ))
overlay-ratio= update-cache' -- "$cur" ))
return 0
;;
-tv)
@ -214,24 +214,24 @@ _mplayer()
audiorate= forceaudio alsa amode= \
forcechan= adevice= audioid= volume= \
bass= treble= balance= fps= \
channels= immediatemode=' -- $cur ) )
channels= immediatemode=' -- "$cur" ) )
return 0
;;
-mf)
COMPREPLY=( $( compgen -W 'on w= h= fps= type=' \
-- $cur ) )
-- "$cur" ) )
return 0
;;
-cdda)
COMPREPLY=( $( compgen -W 'speed= paranoia= \
generic-dev= sector-size= overlap= \
toc-bias toc-offset= skip noskip' \
-- $cur ) )
-- "$cur" ) )
return 0
;;
-input)
COMPREPLY=( $( compgen -W 'conf= ar-delay ar-rate \
keylist cmdlist js-dev file' -- $cur ) )
keylist cmdlist js-dev file' -- "$cur" ) )
return 0
;;
-af)
@ -239,11 +239,11 @@ _mplayer()
channels channels= format format= \
volume volume= delay delay= pan \
pan= sub sub= surround surround=' \
-- $cur ) )
-- "$cur" ) )
return 0
;;
-af-adv)
COMPREPLY=( $( compgen -W 'force= list=' -- $cur ) )
COMPREPLY=( $( compgen -W 'force= list=' -- "$cur" ) )
return 0
;;
esac
@ -253,7 +253,7 @@ _mplayer()
COMPREPLY=( $( compgen -W '$( $cmd -list-options 2>/dev/null | \
sed -ne '1,/^[[:space:]]*Name/d' \
-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)'

View File

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

View File

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

View File

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

View File

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

View File

@ -14,7 +14,7 @@ _mysqladmin()
case "$prev" in
-u)
COMPREPLY=( $( compgen -u -- $cur ) )
COMPREPLY=( $( compgen -u -- "$cur" ) )
return 0
;;
*)
@ -22,7 +22,7 @@ _mysqladmin()
esac
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[@]}" \
$( compgen -W 'create drop extended-status flush-hosts \
@ -30,6 +30,6 @@ _mysqladmin()
flush-threads flush-privileges kill \
password ping processlist reload refresh \
shutdown status variables version' \
-- $cur ) )
-- "$cur" ) )
} &&
complete -F _mysqladmin mysqladmin

View File

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

View File

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

View File

@ -18,14 +18,14 @@ _ntpdate()
return 0
;;
-U)
COMPREPLY=( $( compgen -u $cur ) )
COMPREPLY=( $( compgen -u "$cur" ) )
return 0
;;
esac
if [[ "$cur" == -* ]]; then
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
_known_hosts_real "$cur"
fi

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@ have perl &&
{
_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()
@ -45,7 +45,7 @@ _perl()
if [[ "$cur" == -* ]]; then
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
_filedir
fi
@ -100,18 +100,18 @@ _perldoc()
getnetbyaddr getnetbyname getnetent getprotobyname \
getprotobynumber getprotoent getservbyname getservbyport \
getservent sethostent setnetent setprotoent setservent \
gmtime localtime time times' -- $cur ) )
gmtime localtime time times' -- "$cur" ) )
return 0
;;
esac
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
# return available modules (unless it is clearly a file)
if [[ "$cur" != */* ]]; then
_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
}

View File

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

View File

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

View File

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

View File

@ -14,7 +14,7 @@ _portupgrade()
[ "$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[@]%-*} )

View File

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

View File

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

View File

@ -14,11 +14,11 @@ _python()
case "$prev" in
-Q)
COMPREPLY=( $( compgen -W "old new warn warnall" -- $cur ) )
COMPREPLY=( $( compgen -W "old new warn warnall" -- "$cur" ) )
return 0
;;
-W)
COMPREPLY=( $( compgen -W "ignore default all module once error" -- $cur ) )
COMPREPLY=( $( compgen -W "ignore default all module once error" -- "$cur" ) )
return 0
;;
-c)
@ -43,7 +43,7 @@ _python()
_filedir '@(py|pyc|pyo)'
else
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

View File

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

View File

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

View File

@ -21,11 +21,11 @@ _rdesktop()
$HOME/.rdesktop/keymaps 2>/dev/null ) )
COMPREPLY=( ${COMPREPLY[@]:-} $( command ls \
./keymaps 2>/dev/null ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
return 0
;;
-a)
COMPREPLY=( $( compgen -W '8 15 16 24' -- $cur ) )
COMPREPLY=( $( compgen -W '8 15 16 24' -- "$cur" ) )
return 0
;;
-x)
@ -36,7 +36,7 @@ _rdesktop()
-r)
# FIXME: should do $nospace for the colon options
COMPREPLY=( $( compgen -W 'comport: disk: lptport: \
printer: sound: lspci scard' -- $cur ) )
printer: sound: lspci scard' -- "$cur" ) )
return 0
;;
esac
@ -44,7 +44,7 @@ _rdesktop()
if [[ "$cur" == -* ]]; then
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 \
-0 -4 -5' -- $cur ) )
-0 -4 -5' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi

View File

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

View File

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

View File

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

View File

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

View File

@ -1,32 +1,4 @@
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
# 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 \
_path ${classes[@]} | ruby -ane 'if /^-/.../^-/ and \
! /^-/ and ! /^ +(class|module): / then \
print $_.split(/, |,$| +/).grep(/^[^\[]*$/).join("\n"); \
end' | sort -u )" )
@ -77,7 +49,7 @@ _ri()
if /^ .*[A-Z]/ then print; end; end' ))
fi
COMPREPLY=( $( compgen -W '${classes[@]}' -- $cur ) )
COMPREPLY=( $( compgen -W '${classes[@]}' -- "$cur" ) )
if [[ "$cur" == [A-Z]* ]]; then
# we're completing on class or module alone
return 0

View File

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

View File

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

View File

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

View File

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

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