Trim trailing whitespace (cosmetic, no functional changes).
This commit is contained in:
parent
328bd60242
commit
c6360dde51
@ -214,7 +214,7 @@ quote()
|
|||||||
echo \'${1//\'/\'\\\'\'}\' #'# Help vim syntax highlighting
|
echo \'${1//\'/\'\\\'\'}\' #'# Help vim syntax highlighting
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function quotes the argument in a way so that readline dequoting
|
# This function quotes the argument in a way so that readline dequoting
|
||||||
# results in the original argument
|
# results in the original argument
|
||||||
quote_readline()
|
quote_readline()
|
||||||
{
|
{
|
||||||
@ -265,9 +265,9 @@ _get_cword()
|
|||||||
index="$(( index - old_size + new_size ))"
|
index="$(( index - old_size + new_size ))"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "${COMP_WORDS[COMP_CWORD]:0:${#cur}}" != "$cur" ]]; then
|
if [[ "${COMP_WORDS[COMP_CWORD]:0:${#cur}}" != "$cur" ]]; then
|
||||||
# We messed up! At least return the whole word so things
|
# We messed up! At least return the whole word so things
|
||||||
# keep working
|
# keep working
|
||||||
printf "%s" "${COMP_WORDS[COMP_CWORD]}"
|
printf "%s" "${COMP_WORDS[COMP_CWORD]}"
|
||||||
else
|
else
|
||||||
@ -289,16 +289,16 @@ _filedir()
|
|||||||
|
|
||||||
local -a toks
|
local -a toks
|
||||||
local tmp
|
local tmp
|
||||||
|
|
||||||
# TODO: I've removed a "[ -n $tmp ] &&" before `echo $tmp',
|
# TODO: I've removed a "[ -n $tmp ] &&" before `echo $tmp',
|
||||||
# and everything works again. If this bug
|
# and everything works again. If this bug
|
||||||
# suddenly appears again (i.e. "cd /b<TAB>"
|
# suddenly appears again (i.e. "cd /b<TAB>"
|
||||||
# becomes "cd /"), remember to check for
|
# becomes "cd /"), remember to check for
|
||||||
# other similar conditionals (here and
|
# other similar conditionals (here and
|
||||||
# _filedir_xspec()). --David
|
# _filedir_xspec()). --David
|
||||||
# NOTE: The comment above has been moved outside of the subshell below,
|
# NOTE: The comment above has been moved outside of the subshell below,
|
||||||
# because quotes-in-comments-in-a-subshell cause errors on
|
# because quotes-in-comments-in-a-subshell cause errors on
|
||||||
# bash-3.1. See also:
|
# bash-3.1. See also:
|
||||||
# http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html
|
# http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html
|
||||||
toks=( ${toks[@]-} $(
|
toks=( ${toks[@]-} $(
|
||||||
compgen -d -- "$(quote_readline "$cur")" | {
|
compgen -d -- "$(quote_readline "$cur")" | {
|
||||||
@ -307,7 +307,7 @@ _filedir()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
|
||||||
if [[ "$1" != -d ]]; then
|
if [[ "$1" != -d ]]; then
|
||||||
xspec=${1:+"!*.$1"}
|
xspec=${1:+"!*.$1"}
|
||||||
toks=( ${toks[@]-} $(
|
toks=( ${toks[@]-} $(
|
||||||
@ -732,7 +732,7 @@ _chgrp()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
# options completion
|
# options completion
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \
|
COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \
|
||||||
@ -1048,7 +1048,7 @@ _user_at_host() {
|
|||||||
}
|
}
|
||||||
shopt -u hostcomplete && complete -F _user_at_host $nospace talk ytalk finger
|
shopt -u hostcomplete && complete -F _user_at_host $nospace talk ytalk finger
|
||||||
|
|
||||||
# NOTE: Using this function as a helper function is deprecated. Use
|
# NOTE: Using this function as a helper function is deprecated. Use
|
||||||
# `_known_hosts_real' instead.
|
# `_known_hosts_real' instead.
|
||||||
_known_hosts()
|
_known_hosts()
|
||||||
{
|
{
|
||||||
@ -1354,7 +1354,7 @@ _command_offset()
|
|||||||
# get function name
|
# get function name
|
||||||
func=${cspec#*-F }
|
func=${cspec#*-F }
|
||||||
func=${func%% *}
|
func=${func%% *}
|
||||||
|
|
||||||
if [[ ${#COMP_WORDS[@]} -ge 2 ]]; then
|
if [[ ${#COMP_WORDS[@]} -ge 2 ]]; then
|
||||||
$func $cmd "${COMP_WORDS[${#COMP_WORDS[@]}-1]}" "${COMP_WORDS[${#COMP_WORDS[@]}-2]}"
|
$func $cmd "${COMP_WORDS[${#COMP_WORDS[@]}-1]}" "${COMP_WORDS[${#COMP_WORDS[@]}-2]}"
|
||||||
else
|
else
|
||||||
@ -1498,7 +1498,7 @@ _filedir_xspec()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
|
||||||
toks=( ${toks[@]-} $(
|
toks=( ${toks[@]-} $(
|
||||||
eval compgen -f -X "$xspec" -- "\$(quote_readline "\$cur")" | {
|
eval compgen -f -X "$xspec" -- "\$(quote_readline "\$cur")" | {
|
||||||
while read -r tmp; do
|
while read -r tmp; do
|
||||||
@ -1506,7 +1506,7 @@ _filedir_xspec()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
|
||||||
COMPREPLY=( "${toks[@]}" )
|
COMPREPLY=( "${toks[@]}" )
|
||||||
}
|
}
|
||||||
list=( $( sed -ne '/^# START exclude/,/^# FINISH exclude/p' \
|
list=( $( sed -ne '/^# START exclude/,/^# FINISH exclude/p' \
|
||||||
@ -1538,7 +1538,7 @@ if [ -d $BASH_COMPLETION_COMPAT_DIR -a -r $BASH_COMPLETION_COMPAT_DIR -a \
|
|||||||
-x $BASH_COMPLETION_COMPAT_DIR ]; then
|
-x $BASH_COMPLETION_COMPAT_DIR ]; then
|
||||||
for i in $BASH_COMPLETION_COMPAT_DIR/*; do
|
for i in $BASH_COMPLETION_COMPAT_DIR/*; do
|
||||||
[[ ${i##*/} != @(*~|*.bak|*.swp|\#*\#|*.dpkg*|*.rpm@(orig|new|save)) ]] &&
|
[[ ${i##*/} != @(*~|*.bak|*.swp|\#*\#|*.dpkg*|*.rpm@(orig|new|save)) ]] &&
|
||||||
[ \( -f $i -o -h $i \) -a -r $i ] && . $i
|
[ \( -f $i -o -h $i \) -a -r $i ] && . $i
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
if [ -d $BASH_COMPLETION_DIR -a -r $BASH_COMPLETION_DIR -a \
|
if [ -d $BASH_COMPLETION_DIR -a -r $BASH_COMPLETION_DIR -a \
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
have apache2ctl && {
|
have apache2ctl && {
|
||||||
_apache2ctl() {
|
_apache2ctl() {
|
||||||
local APWORDS
|
local APWORDS
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=`_get_cword`
|
cur=`_get_cword`
|
||||||
|
|
||||||
APWORDS=$(apache2ctl 2>&1 >/dev/null | head -n1 | cut -f3 -d" " | tr "|" " ")
|
APWORDS=$(apache2ctl 2>&1 >/dev/null | head -n1 | cut -f3 -d" " | tr "|" " ")
|
||||||
|
|
||||||
COMPREPLY=( $( compgen -W "$APWORDS" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$APWORDS" -- "$cur" ) )
|
||||||
}
|
}
|
||||||
complete -F _apache2ctl apache2ctl
|
complete -F _apache2ctl apache2ctl
|
||||||
|
@ -116,7 +116,7 @@ _apt_cache()
|
|||||||
uniq | cut -f2 -d" " ) )
|
uniq | cut -f2 -d" " ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
|
COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
|
||||||
return 0
|
return 0
|
||||||
|
@ -31,7 +31,7 @@ _bluetooth_packet_types()
|
|||||||
$cur ) )
|
$cur ) )
|
||||||
}
|
}
|
||||||
|
|
||||||
_get_command()
|
_get_command()
|
||||||
{
|
{
|
||||||
local i
|
local i
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ _sdptool()
|
|||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--bdaddr \
|
COMPREPLY=( $( compgen -W '--bdaddr \
|
||||||
--tree --raw --xml' -- $cur ) )
|
--tree --raw --xml' -- $cur ) )
|
||||||
else
|
else
|
||||||
_bluetooth_services
|
_bluetooth_services
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -171,7 +171,7 @@ _sdptool()
|
|||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--tree \
|
COMPREPLY=( $( compgen -W '--tree \
|
||||||
--raw --xml' -- $cur ) )
|
--raw --xml' -- $cur ) )
|
||||||
else
|
else
|
||||||
_bluetooth_adresses
|
_bluetooth_adresses
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -352,7 +352,7 @@ _hciconfig()
|
|||||||
voice iac inqmode inqdata inqtype inqparams \
|
voice iac inqmode inqdata inqtype inqparams \
|
||||||
pageparms pageto afhmode aclmtu scomtu putkey \
|
pageparms pageto afhmode aclmtu scomtu putkey \
|
||||||
delkey commands features version revision lm' \
|
delkey commands features version revision lm' \
|
||||||
-- $cur ) )
|
-- $cur ) )
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
case $command in
|
case $command in
|
||||||
|
@ -8,12 +8,12 @@ _cksfv()
|
|||||||
{
|
{
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=`_get_cword`
|
cur=`_get_cword`
|
||||||
|
|
||||||
if [ $COMP_CWORD -eq 1 ]; then
|
if [ $COMP_CWORD -eq 1 ]; then
|
||||||
COMPREPLY=( $( compgen -W '-C -f -i -q -v' -- $cur ) )
|
COMPREPLY=( $( compgen -W '-C -f -i -q -v' -- $cur ) )
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "${COMP_WORDS[$COMP_CWORD-1]}" in
|
case "${COMP_WORDS[$COMP_CWORD-1]}" in
|
||||||
-C)
|
-C)
|
||||||
_filedir -d
|
_filedir -d
|
||||||
@ -24,7 +24,7 @@ _cksfv()
|
|||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
_filedir
|
_filedir
|
||||||
return 0
|
return 0
|
||||||
} &&
|
} &&
|
||||||
|
@ -39,7 +39,7 @@ _cpan2dist()
|
|||||||
done
|
done
|
||||||
COMPREPLY=( $( zgrep "^${cur//-/::}" \
|
COMPREPLY=( $( zgrep "^${cur//-/::}" \
|
||||||
$packagelist 2>/dev/null \
|
$packagelist 2>/dev/null \
|
||||||
| awk '{print $1}' | sed -e 's/::/-/g' ) )
|
| awk '{print $1}' | sed -e 's/::/-/g' ) )
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
complete -F _cpan2dist $default cpan2dist
|
complete -F _cpan2dist $default cpan2dist
|
||||||
|
@ -27,7 +27,7 @@ _gnatmake()
|
|||||||
else
|
else
|
||||||
# source file completion
|
# source file completion
|
||||||
_filedir '@(adb|ads)'
|
_filedir '@(adb|ads)'
|
||||||
|
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
complete -F _gnatmake $filenames gnatmake
|
complete -F _gnatmake $filenames gnatmake
|
||||||
|
@ -7,11 +7,11 @@ have gpg2 && {
|
|||||||
_gpg2 ()
|
_gpg2 ()
|
||||||
{
|
{
|
||||||
local cur prev
|
local cur prev
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=`_get_cword`
|
cur=`_get_cword`
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
--homedir)
|
--homedir)
|
||||||
_filedir -d
|
_filedir -d
|
||||||
@ -34,7 +34,7 @@ _gpg2 ()
|
|||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-s -b -e -c -d -k -K -a -r -u -z -o -v \
|
COMPREPLY=( $( compgen -W '-s -b -e -c -d -k -K -a -r -u -z -o -v \
|
||||||
-n -N -i -h -R -t $(gpg2 --dump-options)' -- $cur ) )
|
-n -N -i -h -R -t $(gpg2 --dump-options)' -- $cur ) )
|
||||||
|
@ -522,7 +522,7 @@ _stream()
|
|||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-authenticate -channel -colorspace \
|
COMPREPLY=( $( compgen -W '-authenticate -channel -colorspace \
|
||||||
-compress -debug -define -density -depth -extract \
|
-compress -debug -define -density -depth -extract \
|
||||||
-help -identify -interlace -interpolate -limit -list \
|
-help -identify -interlace -interpolate -limit -list \
|
||||||
-log -map -monitor -quantize -quiet -regard-warnings \
|
-log -map -monitor -quantize -quiet -regard-warnings \
|
||||||
-respect-parenthesis -sampling-factor -seed -set \
|
-respect-parenthesis -sampling-factor -seed -set \
|
||||||
|
@ -8,7 +8,7 @@ _isql()
|
|||||||
{
|
{
|
||||||
local cur
|
local cur
|
||||||
cur=`_get_cword`
|
cur=`_get_cword`
|
||||||
|
|
||||||
[ -f "$ODBCINI" ] && COMPREPLY=( $( grep \\[$cur "$ODBCINI" | tr -d \\[\\] ) )
|
[ -f "$ODBCINI" ] && COMPREPLY=( $( grep \\[$cur "$ODBCINI" | tr -d \\[\\] ) )
|
||||||
} &&
|
} &&
|
||||||
complete -F _isql isql
|
complete -F _isql isql
|
||||||
|
@ -75,12 +75,12 @@ _java_classes()
|
|||||||
|
|
||||||
elif [ -d $i ]; then
|
elif [ -d $i ]; then
|
||||||
i=${i%/}
|
i=${i%/}
|
||||||
|
|
||||||
# See Debian bug #496828
|
# See Debian bug #496828
|
||||||
COMPREPLY=( "${COMPREPLY[@]}" $( find "$i" -type f \
|
COMPREPLY=( "${COMPREPLY[@]}" $( find "$i" -type f \
|
||||||
-maxdepth 1 -path "$i/$cur*.class" 2>/dev/null | \
|
-maxdepth 1 -path "$i/$cur*.class" 2>/dev/null | \
|
||||||
grep -v "\\$" | sed -e "s|^$i/||" ) )
|
grep -v "\\$" | sed -e "s|^$i/||" ) )
|
||||||
|
|
||||||
# FIXME: if we have foo.class and foo/, the completion
|
# FIXME: if we have foo.class and foo/, the completion
|
||||||
# returns "foo/"... how to give precedence to files
|
# returns "foo/"... how to give precedence to files
|
||||||
# over directories?
|
# over directories?
|
||||||
|
@ -424,7 +424,7 @@ _arch()
|
|||||||
1)
|
1)
|
||||||
_mailman_lists
|
_mailman_lists
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
_filedir
|
_filedir
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -63,7 +63,7 @@ _make()
|
|||||||
|
|
||||||
[ -n "$makef" ] && makef="-f ${makef}"
|
[ -n "$makef" ] && makef="-f ${makef}"
|
||||||
[ -n "$makef_dir" ] && makef_dir="-C ${makef_dir}"
|
[ -n "$makef_dir" ] && makef_dir="-C ${makef_dir}"
|
||||||
|
|
||||||
COMPREPLY=( $( compgen -W "$( make -qp $makef $makef_dir 2>/dev/null | \
|
COMPREPLY=( $( compgen -W "$( make -qp $makef $makef_dir 2>/dev/null | \
|
||||||
awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ \
|
awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ \
|
||||||
{split($1,A,/ /);for(i in A)print A[i]}' )" \
|
{split($1,A,/ /);for(i in A)print A[i]}' )" \
|
||||||
|
@ -16,7 +16,7 @@ _man()
|
|||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=`_get_cword`
|
cur=`_get_cword`
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
if [[ "$prev" == -l ]]; then
|
if [[ "$prev" == -l ]]; then
|
||||||
_filedir $manext
|
_filedir $manext
|
||||||
return 0
|
return 0
|
||||||
|
@ -8,7 +8,7 @@ _monodevelop()
|
|||||||
{
|
{
|
||||||
local cur
|
local cur
|
||||||
cur=`_get_cword`
|
cur=`_get_cword`
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-? -help \
|
COMPREPLY=( $( compgen -W '-? -help \
|
||||||
-help2 \
|
-help2 \
|
||||||
@ -33,7 +33,7 @@ _mdtool()
|
|||||||
|
|
||||||
cur=`_get_cword`
|
cur=`_get_cword`
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
|
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
|
||||||
if [[ ${COMP_WORDS[i]} == @(build|generate-makefiles|setup) ]]; then
|
if [[ ${COMP_WORDS[i]} == @(build|generate-makefiles|setup) ]]; then
|
||||||
command=${COMP_WORDS[i]}
|
command=${COMP_WORDS[i]}
|
||||||
@ -87,11 +87,11 @@ _mdtool()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
COMPREPLY=( $( compgen -W 'gsetup build dbgen project-export \
|
COMPREPLY=( $( compgen -W 'gsetup build dbgen project-export \
|
||||||
generate-makefiles gettext-update \
|
generate-makefiles gettext-update \
|
||||||
setup -q' -- "$cur" ) )
|
setup -q' -- "$cur" ) )
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
} &&
|
} &&
|
||||||
complete -F _mdtool $filenames mdtool
|
complete -F _mdtool $filenames mdtool
|
||||||
|
@ -7,7 +7,7 @@ have mtx &&
|
|||||||
_mtx()
|
_mtx()
|
||||||
{
|
{
|
||||||
local cur prev options tapes drives
|
local cur prev options tapes drives
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=`_get_cword`
|
cur=`_get_cword`
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
@ -25,9 +25,9 @@ _mtx()
|
|||||||
drives=${drives//:Empty}
|
drives=${drives//:Empty}
|
||||||
|
|
||||||
if [ $COMP_CWORD -gt 1 ]; then
|
if [ $COMP_CWORD -gt 1 ]; then
|
||||||
case $prev in
|
case $prev in
|
||||||
load)
|
load)
|
||||||
COMPREPLY=( $( compgen -W "$tapes" -- $cur ) )
|
COMPREPLY=( $( compgen -W "$tapes" -- $cur ) )
|
||||||
;;
|
;;
|
||||||
unload|first|last|next)
|
unload|first|last|next)
|
||||||
COMPREPLY=( $( compgen -W "$drives" -- $cur ) )
|
COMPREPLY=( $( compgen -W "$drives" -- $cur ) )
|
||||||
|
@ -209,7 +209,7 @@ _openssl()
|
|||||||
-no_tls1 -bugs -cipher \
|
-no_tls1 -bugs -cipher \
|
||||||
-starttls -engine -tlsextdebug \
|
-starttls -engine -tlsextdebug \
|
||||||
-no_ticket -sess_out -sess_in \
|
-no_ticket -sess_out -sess_in \
|
||||||
-rand'
|
-rand'
|
||||||
;;
|
;;
|
||||||
s_server)
|
s_server)
|
||||||
options='-accept -context -verify \
|
options='-accept -context -verify \
|
||||||
|
@ -7,7 +7,7 @@ have qdbus &&
|
|||||||
_qdbus()
|
_qdbus()
|
||||||
{
|
{
|
||||||
local cur compstr
|
local cur compstr
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=`_get_cword`
|
cur=`_get_cword`
|
||||||
if [ -z "$cur" ]; then
|
if [ -z "$cur" ]; then
|
||||||
|
@ -59,7 +59,7 @@ _ri()
|
|||||||
method=${cur#*$separator}
|
method=${cur#*$separator}
|
||||||
classes=( $class )
|
classes=( $class )
|
||||||
prefix="-P $class$separator"
|
prefix="-P $class$separator"
|
||||||
ri_get_methods
|
ri_get_methods
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ _rpm_nodigsig()
|
|||||||
{
|
{
|
||||||
if [ -z "$nodig" -a -z "$nosig" ]; then
|
if [ -z "$nodig" -a -z "$nosig" ]; then
|
||||||
local rpmver
|
local rpmver
|
||||||
|
|
||||||
rpmver=$(rpm --version)
|
rpmver=$(rpm --version)
|
||||||
rpmver=${rpmver##* }
|
rpmver=${rpmver##* }
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# bash completion for strace
|
# bash completion for strace
|
||||||
|
|
||||||
have strace &&
|
have strace &&
|
||||||
_strace()
|
_strace()
|
||||||
{
|
{
|
||||||
local cur prev offset i syscalls arch unistd
|
local cur prev offset i syscalls arch unistd
|
||||||
@ -38,7 +38,7 @@ _strace()
|
|||||||
if [[ "$cur" == *=* ]]; then
|
if [[ "$cur" == *=* ]]; then
|
||||||
prev=${cur/=*/}
|
prev=${cur/=*/}
|
||||||
cur=${cur/*=/}
|
cur=${cur/*=/}
|
||||||
|
|
||||||
# Import arch-specific syscalls -- not foolproof IMHO
|
# Import arch-specific syscalls -- not foolproof IMHO
|
||||||
#+ --David Paleino
|
#+ --David Paleino
|
||||||
arch=$(command uname -m)
|
arch=$(command uname -m)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# unace(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
|
# unace(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
|
||||||
|
|
||||||
have unace &&
|
have unace &&
|
||||||
_unace()
|
_unace()
|
||||||
{
|
{
|
||||||
local cur
|
local cur
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ _unace()
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
} &&
|
} &&
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# unrar(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
|
# unrar(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
|
||||||
|
|
||||||
have unrar &&
|
have unrar &&
|
||||||
_unrar()
|
_unrar()
|
||||||
{
|
{
|
||||||
local cur
|
local cur
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ _unrar()
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
} &&
|
} &&
|
||||||
complete -F _unrar $filenames unrar
|
complete -F _unrar $filenames unrar
|
||||||
|
@ -7,7 +7,7 @@ have vncviewer &&
|
|||||||
_vncviewer_bootstrap() {
|
_vncviewer_bootstrap() {
|
||||||
local fname
|
local fname
|
||||||
case "$(_realcommand vncviewer)" in
|
case "$(_realcommand vncviewer)" in
|
||||||
# If `vncviewer' not installed, default file-dir completion
|
# If `vncviewer' not installed, default file-dir completion
|
||||||
'') _filedir `_get_cword` ;;
|
'') _filedir `_get_cword` ;;
|
||||||
*xvnc4viewer) fname=_xvnc4viewer ;;
|
*xvnc4viewer) fname=_xvnc4viewer ;;
|
||||||
*tightvncviewer|*) fname=_tightvncviewer ;;
|
*tightvncviewer|*) fname=_tightvncviewer ;;
|
||||||
@ -117,7 +117,7 @@ _xvnc4viewer()
|
|||||||
# Variable 'nocasematch' isn't available;
|
# Variable 'nocasematch' isn't available;
|
||||||
# Convert completions to lowercase
|
# Convert completions to lowercase
|
||||||
COMPREPLY=( $( compgen -W "$(
|
COMPREPLY=( $( compgen -W "$(
|
||||||
echo ${options[@]/#/$dash} | tr [:upper:] [:lower:]
|
echo ${options[@]/#/$dash} | tr [:upper:] [:lower:]
|
||||||
)" -- "$(echo "$cur" | tr [:upper:] [:lower:])" ) )
|
)" -- "$(echo "$cur" | tr [:upper:] [:lower:])" ) )
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -19,7 +19,7 @@ _vpnc()
|
|||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
--pfs)
|
--pfs)
|
||||||
COMPREPLY=( $( compgen -W 'dh1 dh2 dh5' -- $cur ) )
|
COMPREPLY=( $( compgen -W 'dh1 dh2 dh5' -- $cur ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
--@(pid-file|script))
|
--@(pid-file|script))
|
||||||
|
@ -32,7 +32,7 @@ _xm()
|
|||||||
vtpm-list vnet-list vnet-create vnet-delete labels addlabel \
|
vtpm-list vnet-list vnet-create vnet-delete labels addlabel \
|
||||||
rmlabel getlabel dry-run resources makepolicy loadpolicy \
|
rmlabel getlabel dry-run resources makepolicy loadpolicy \
|
||||||
cfgbootpolicy dumppolicy help'
|
cfgbootpolicy dumppolicy help'
|
||||||
|
|
||||||
if [[ $COMP_CWORD -eq 1 ]] ; then
|
if [[ $COMP_CWORD -eq 1 ]] ; then
|
||||||
COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
|
COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user