[Bash-completion-commits] [SCM] bash-completion branch, master, updated. c6360dde51e4e777a765d20852b2e452a8e6221d
Ville Skyttä
ville.skytta at iki.fi
Sat Jul 25 10:38:51 UTC 2009
The following commit has been merged in the master branch:
commit c6360dde51e4e777a765d20852b2e452a8e6221d
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Jul 25 13:38:42 2009 +0300
Trim trailing whitespace (cosmetic, no functional changes).
diff --git a/bash_completion b/bash_completion
index 08d9f86..6d2698c 100644
--- a/bash_completion
+++ b/bash_completion
@@ -214,7 +214,7 @@ quote()
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
quote_readline()
{
@@ -265,9 +265,9 @@ _get_cword()
index="$(( index - old_size + new_size ))"
fi
done
-
+
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
printf "%s" "${COMP_WORDS[COMP_CWORD]}"
else
@@ -289,16 +289,16 @@ _filedir()
local -a toks
local tmp
-
+
# TODO: I've removed a "[ -n $tmp ] &&" before `echo $tmp',
# and everything works again. If this bug
# suddenly appears again (i.e. "cd /b<TAB>"
# becomes "cd /"), remember to check for
# other similar conditionals (here and
# _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
- # bash-3.1. See also:
+ # bash-3.1. See also:
# http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html
toks=( ${toks[@]-} $(
compgen -d -- "$(quote_readline "$cur")" | {
@@ -307,7 +307,7 @@ _filedir()
done
}
))
-
+
if [[ "$1" != -d ]]; then
xspec=${1:+"!*.$1"}
toks=( ${toks[@]-} $(
@@ -732,7 +732,7 @@ _chgrp()
fi
$split && return 0
-
+
# options completion
if [[ "$cur" == -* ]]; then
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
-# 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()
{
@@ -1354,7 +1354,7 @@ _command_offset()
# get function name
func=${cspec#*-F }
func=${func%% *}
-
+
if [[ ${#COMP_WORDS[@]} -ge 2 ]]; then
$func $cmd "${COMP_WORDS[${#COMP_WORDS[@]}-1]}" "${COMP_WORDS[${#COMP_WORDS[@]}-2]}"
else
@@ -1498,7 +1498,7 @@ _filedir_xspec()
done
}
))
-
+
toks=( ${toks[@]-} $(
eval compgen -f -X "$xspec" -- "\$(quote_readline "\$cur")" | {
while read -r tmp; do
@@ -1506,7 +1506,7 @@ _filedir_xspec()
done
}
))
-
+
COMPREPLY=( "${toks[@]}" )
}
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
for i in $BASH_COMPLETION_COMPAT_DIR/*; do
[[ ${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
fi
if [ -d $BASH_COMPLETION_DIR -a -r $BASH_COMPLETION_DIR -a \
diff --git a/contrib/apache2ctl b/contrib/apache2ctl
index 8794b4a..1153b62 100644
--- a/contrib/apache2ctl
+++ b/contrib/apache2ctl
@@ -6,12 +6,12 @@
have apache2ctl && {
_apache2ctl() {
local APWORDS
-
+
COMPREPLY=()
cur=`_get_cword`
-
+
APWORDS=$(apache2ctl 2>&1 >/dev/null | head -n1 | cut -f3 -d" " | tr "|" " ")
-
+
COMPREPLY=( $( compgen -W "$APWORDS" -- "$cur" ) )
}
complete -F _apache2ctl apache2ctl
diff --git a/contrib/apt b/contrib/apt
index d3bf26b..366e5af 100644
--- a/contrib/apt
+++ b/contrib/apt
@@ -116,7 +116,7 @@ _apt_cache()
uniq | cut -f2 -d" " ) )
return 0
;;
-
+
*)
COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
return 0
diff --git a/contrib/bluez-utils b/contrib/bluez-utils
index 8300ef2..5586775 100644
--- a/contrib/bluez-utils
+++ b/contrib/bluez-utils
@@ -31,7 +31,7 @@ _bluetooth_packet_types()
$cur ) )
}
-_get_command()
+_get_command()
{
local i
@@ -163,7 +163,7 @@ _sdptool()
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--bdaddr \
--tree --raw --xml' -- $cur ) )
- else
+ else
_bluetooth_services
fi
;;
@@ -171,7 +171,7 @@ _sdptool()
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--tree \
--raw --xml' -- $cur ) )
- else
+ else
_bluetooth_adresses
fi
;;
@@ -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
diff --git a/contrib/cksfv b/contrib/cksfv
index cbb8c0a..b875870 100644
--- a/contrib/cksfv
+++ b/contrib/cksfv
@@ -8,12 +8,12 @@ _cksfv()
{
COMPREPLY=()
cur=`_get_cword`
-
+
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W '-C -f -i -q -v' -- $cur ) )
return 0
fi
-
+
case "${COMP_WORDS[$COMP_CWORD-1]}" in
-C)
_filedir -d
@@ -24,7 +24,7 @@ _cksfv()
return 0
;;
esac
-
+
_filedir
return 0
} &&
diff --git a/contrib/cpan2dist b/contrib/cpan2dist
index caec18f..d028115 100644
--- a/contrib/cpan2dist
+++ b/contrib/cpan2dist
@@ -39,7 +39,7 @@ _cpan2dist()
done
COMPREPLY=( $( zgrep "^${cur//-/::}" \
$packagelist 2>/dev/null \
- | awk '{print $1}' | sed -e 's/::/-/g' ) )
+ | awk '{print $1}' | sed -e 's/::/-/g' ) )
fi
} &&
complete -F _cpan2dist $default cpan2dist
diff --git a/contrib/gnatmake b/contrib/gnatmake
index 5a43787..6b45212 100644
--- a/contrib/gnatmake
+++ b/contrib/gnatmake
@@ -27,7 +27,7 @@ _gnatmake()
else
# source file completion
_filedir '@(adb|ads)'
-
+
fi
} &&
complete -F _gnatmake $filenames gnatmake
diff --git a/contrib/gpg2 b/contrib/gpg2
index c41aa0a..e46fda9 100644
--- a/contrib/gpg2
+++ b/contrib/gpg2
@@ -7,11 +7,11 @@ have gpg2 && {
_gpg2 ()
{
local cur prev
-
+
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
-
+
case "$prev" in
--homedir)
_filedir -d
@@ -34,7 +34,7 @@ _gpg2 ()
return 0
;;
esac
-
+
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 ) )
diff --git a/contrib/imagemagick b/contrib/imagemagick
index ccad88f..d0769f4 100644
--- a/contrib/imagemagick
+++ b/contrib/imagemagick
@@ -522,7 +522,7 @@ _stream()
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-authenticate -channel -colorspace \
- -compress -debug -define -density -depth -extract \
+ -compress -debug -define -density -depth -extract \
-help -identify -interlace -interpolate -limit -list \
-log -map -monitor -quantize -quiet -regard-warnings \
-respect-parenthesis -sampling-factor -seed -set \
diff --git a/contrib/isql b/contrib/isql
index 1ebf172..a856ef2 100644
--- a/contrib/isql
+++ b/contrib/isql
@@ -8,7 +8,7 @@ _isql()
{
local cur
cur=`_get_cword`
-
+
[ -f "$ODBCINI" ] && COMPREPLY=( $( grep \\[$cur "$ODBCINI" | tr -d \\[\\] ) )
} &&
complete -F _isql isql
diff --git a/contrib/java b/contrib/java
index 1e70690..1d76a8d 100644
--- a/contrib/java
+++ b/contrib/java
@@ -75,12 +75,12 @@ _java_classes()
elif [ -d $i ]; then
i=${i%/}
-
+
# See Debian bug #496828
COMPREPLY=( "${COMPREPLY[@]}" $( find "$i" -type f \
-maxdepth 1 -path "$i/$cur*.class" 2>/dev/null | \
grep -v "\\$" | sed -e "s|^$i/||" ) )
-
+
# FIXME: if we have foo.class and foo/, the completion
# returns "foo/"... how to give precedence to files
# over directories?
diff --git a/contrib/mailman b/contrib/mailman
index a7999d9..5b19dff 100644
--- a/contrib/mailman
+++ b/contrib/mailman
@@ -424,7 +424,7 @@ _arch()
1)
_mailman_lists
;;
- 2)
+ 2)
_filedir
;;
esac
diff --git a/contrib/make b/contrib/make
index 830b26d..d1c5ac0 100644
--- a/contrib/make
+++ b/contrib/make
@@ -63,7 +63,7 @@ _make()
[ -n "$makef" ] && makef="-f ${makef}"
[ -n "$makef_dir" ] && makef_dir="-C ${makef_dir}"
-
+
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]}' )" \
diff --git a/contrib/man b/contrib/man
index 1e409d3..89bf877 100644
--- a/contrib/man
+++ b/contrib/man
@@ -16,7 +16,7 @@ _man()
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
-
+
if [[ "$prev" == -l ]]; then
_filedir $manext
return 0
diff --git a/contrib/monodevelop b/contrib/monodevelop
index 3d8430c..94570d6 100644
--- a/contrib/monodevelop
+++ b/contrib/monodevelop
@@ -8,7 +8,7 @@ _monodevelop()
{
local cur
cur=`_get_cword`
-
+
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-? -help \
-help2 \
@@ -33,7 +33,7 @@ _mdtool()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
-
+
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
if [[ ${COMP_WORDS[i]} == @(build|generate-makefiles|setup) ]]; then
command=${COMP_WORDS[i]}
@@ -87,11 +87,11 @@ _mdtool()
;;
esac
fi
-
+
COMPREPLY=( $( compgen -W 'gsetup build dbgen project-export \
generate-makefiles gettext-update \
setup -q' -- "$cur" ) )
-
+
return 0
} &&
complete -F _mdtool $filenames mdtool
diff --git a/contrib/mtx b/contrib/mtx
index 3ac0f6d..7d5f2cc 100644
--- a/contrib/mtx
+++ b/contrib/mtx
@@ -7,7 +7,7 @@ have mtx &&
_mtx()
{
local cur prev options tapes drives
-
+
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
@@ -25,9 +25,9 @@ _mtx()
drives=${drives//:Empty}
if [ $COMP_CWORD -gt 1 ]; then
- case $prev in
- load)
- COMPREPLY=( $( compgen -W "$tapes" -- $cur ) )
+ case $prev in
+ load)
+ COMPREPLY=( $( compgen -W "$tapes" -- $cur ) )
;;
unload|first|last|next)
COMPREPLY=( $( compgen -W "$drives" -- $cur ) )
diff --git a/contrib/openssl b/contrib/openssl
index d4abdc1..db46592 100644
--- a/contrib/openssl
+++ b/contrib/openssl
@@ -209,7 +209,7 @@ _openssl()
-no_tls1 -bugs -cipher \
-starttls -engine -tlsextdebug \
-no_ticket -sess_out -sess_in \
- -rand'
+ -rand'
;;
s_server)
options='-accept -context -verify \
diff --git a/contrib/qdbus b/contrib/qdbus
index ba749c6..9f697b4 100644
--- a/contrib/qdbus
+++ b/contrib/qdbus
@@ -7,7 +7,7 @@ have qdbus &&
_qdbus()
{
local cur compstr
-
+
COMPREPLY=()
cur=`_get_cword`
if [ -z "$cur" ]; then
diff --git a/contrib/ri b/contrib/ri
index 25c4e06..cfe3f35 100644
--- a/contrib/ri
+++ b/contrib/ri
@@ -59,7 +59,7 @@ _ri()
method=${cur#*$separator}
classes=( $class )
prefix="-P $class$separator"
- ri_get_methods
+ ri_get_methods
return 0
fi
diff --git a/contrib/rpm b/contrib/rpm
index 643e0a2..e6ede17 100644
--- a/contrib/rpm
+++ b/contrib/rpm
@@ -33,7 +33,7 @@ _rpm_nodigsig()
{
if [ -z "$nodig" -a -z "$nosig" ]; then
local rpmver
-
+
rpmver=$(rpm --version)
rpmver=${rpmver##* }
diff --git a/contrib/strace b/contrib/strace
index bf9878f..f9aef75 100644
--- a/contrib/strace
+++ b/contrib/strace
@@ -3,7 +3,7 @@
#
# bash completion for strace
-have strace &&
+have strace &&
_strace()
{
local cur prev offset i syscalls arch unistd
@@ -38,7 +38,7 @@ _strace()
if [[ "$cur" == *=* ]]; then
prev=${cur/=*/}
cur=${cur/*=/}
-
+
# Import arch-specific syscalls -- not foolproof IMHO
#+ --David Paleino
arch=$(command uname -m)
diff --git a/contrib/unace b/contrib/unace
index d63841a..2e05e8c 100644
--- a/contrib/unace
+++ b/contrib/unace
@@ -4,7 +4,7 @@
# unace(1) completion by Guillaume Rousse <rousse at ccr.jussieu.fr>
have unace &&
-_unace()
+_unace()
{
local cur
@@ -23,7 +23,7 @@ _unace()
fi
;;
esac
-
+
return 0
} &&
diff --git a/contrib/unrar b/contrib/unrar
index b467885..ec193b3 100644
--- a/contrib/unrar
+++ b/contrib/unrar
@@ -4,7 +4,7 @@
# unrar(1) completion by Guillaume Rousse <rousse at ccr.jussieu.fr>
have unrar &&
-_unrar()
+_unrar()
{
local cur
@@ -25,7 +25,7 @@ _unrar()
fi
;;
esac
-
+
return 0
} &&
complete -F _unrar $filenames unrar
diff --git a/contrib/vncviewer b/contrib/vncviewer
index 52db006..4b960e4 100644
--- a/contrib/vncviewer
+++ b/contrib/vncviewer
@@ -7,7 +7,7 @@ have vncviewer &&
_vncviewer_bootstrap() {
local fname
case "$(_realcommand vncviewer)" in
- # If `vncviewer' not installed, default file-dir completion
+ # If `vncviewer' not installed, default file-dir completion
'') _filedir `_get_cword` ;;
*xvnc4viewer) fname=_xvnc4viewer ;;
*tightvncviewer|*) fname=_tightvncviewer ;;
@@ -117,7 +117,7 @@ _xvnc4viewer()
# Variable 'nocasematch' isn't available;
# Convert completions to lowercase
COMPREPLY=( $( compgen -W "$(
- echo ${options[@]/#/$dash} | tr [:upper:] [:lower:]
+ echo ${options[@]/#/$dash} | tr [:upper:] [:lower:]
)" -- "$(echo "$cur" | tr [:upper:] [:lower:])" ) )
fi
else
diff --git a/contrib/vpnc b/contrib/vpnc
index ef8fdf7..6ab9ad5 100644
--- a/contrib/vpnc
+++ b/contrib/vpnc
@@ -19,7 +19,7 @@ _vpnc()
return 0
;;
--pfs)
- COMPREPLY=( $( compgen -W 'dh1 dh2 dh5' -- $cur ) )
+ COMPREPLY=( $( compgen -W 'dh1 dh2 dh5' -- $cur ) )
return 0
;;
--@(pid-file|script))
diff --git a/contrib/xm b/contrib/xm
index b4b4bba..4e0cfd3 100644
--- a/contrib/xm
+++ b/contrib/xm
@@ -32,7 +32,7 @@ _xm()
vtpm-list vnet-list vnet-create vnet-delete labels addlabel \
rmlabel getlabel dry-run resources makepolicy loadpolicy \
cfgbootpolicy dumppolicy help'
-
+
if [[ $COMP_CWORD -eq 1 ]] ; then
COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
else
--
bash-completion
More information about the Bash-completion-commits
mailing list