[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.90-125-gb515b0d
Igor Murzov
e-mail at date.by
Mon Jan 9 12:59:59 UTC 2012
The following commit has been merged in the master branch:
commit b515b0dd38158d990be1315db3f8d98f4cb39115
Merge: 694313874a8ef025c5bbbf2a57de058fb684e9b9 d0a14954ab45cb79aba9bff44d5ba910eac7925d
Author: Igor Murzov <e-mail at date.by>
Date: Mon Jan 9 16:25:00 2012 +0400
Merge remote-tracking branch 'origin/sudo'
* origin/sudo:
sudoedit: New completion.
sudo: Fix option list parsing
sudo: Handle options (Alioth: #311414).
diff --combined bash_completion
index 374e20c,c2e59f3..e3ff95f
--- a/bash_completion
+++ b/bash_completion
@@@ -24,7 -24,7 +24,7 @@@
#
# http://bash-completion.alioth.debian.org/
#
-# RELEASE: 1.90
+# RELEASE: 1.99
if [[ $- == *v* ]]; then
BASH_COMPLETION_ORIGINAL_V_VALUE="-v"
@@@ -32,15 -32,15 +32,15 @@@ els
BASH_COMPLETION_ORIGINAL_V_VALUE="+v"
fi
-if [[ -n $BASH_COMPLETION_DEBUG ]]; then
+if [[ ${BASH_COMPLETION_DEBUG-} ]]; then
set -v
else
set +v
fi
-# Alter the following to reflect the location of this file.
+# Set the following to the location of the backwards compat completion dir.
#
-[ -n "$BASH_COMPLETION_COMPAT_DIR" ] || BASH_COMPLETION_COMPAT_DIR=/etc/bash_completion.d
+: ${BASH_COMPLETION_COMPAT_DIR:=/etc/bash_completion.d}
readonly BASH_COMPLETION_COMPAT_DIR
# Blacklisted completions, causing problems with our code.
@@@ -590,11 -590,9 +590,11 @@@ _filedir(
-n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \
toks+=( $( compgen -f -- $quoted ) )
- [[ ${#toks[@]} -ne 0 ]] && compopt -o filenames 2>/dev/null
-
- COMPREPLY+=( "${toks[@]}" )
+ if [[ ${#toks[@]} -ne 0 ]]; then
+ # 2>/dev/null for direct invocation, e.g. in the _filedir unit test
+ compopt -o filenames 2>/dev/null
+ COMPREPLY+=( "${toks[@]}" )
+ fi
} # _filedir()
@@@ -648,7 -646,7 +648,7 @@@ _variables(
#
_init_completion()
{
- local exclude flag outx errx inx OPTIND=1
+ local exclude= flag outx errx inx OPTIND=1
while getopts "n:e:o:i:s" flag "$@"; do
case $flag in
@@@ -710,7 -708,7 +710,7 @@@
[[ $cword -eq 0 ]] && return 1
prev=${words[cword-1]}
- [[ $split ]] && _split_longopt && split=true
+ [[ ${split-} ]] && _split_longopt && split=true
return 0
}
@@@ -925,7 -923,6 +925,7 @@@ _tilde(
# Try generate ~username completions
COMPREPLY=( $( compgen -P '~' -u "${1#\~}" ) )
result=${#COMPREPLY[@]}
+ # 2>/dev/null for direct invocation, e.g. in the _tilde unit test
[[ $result -gt 0 ]] && compopt -o filenames 2>/dev/null
fi
return $result
@@@ -1730,7 -1727,7 +1730,7 @@@ _root_command(
local root_command=$1
_command
}
- complete -F _root_command fakeroot gksu gksudo kdesudo really sudo
+ complete -F _root_command fakeroot gksu gksudo kdesudo really
# Return true if the completion should be treated as running as root
_complete_as_root()
@@@ -1830,10 -1827,8 +1830,10 @@@ _filedir_xspec(
}
))
- [[ ${#toks[@]} -ne 0 ]] && compopt -o filenames
- COMPREPLY=( "${toks[@]}" )
+ if [[ ${#toks[@]} -ne 0 ]]; then
+ compopt -o filenames
+ COMPREPLY=( "${toks[@]}" )
+ fi
}
_install_xspec()
diff --combined completions/Makefile.am
index 7385e44,6781981..6e0f56f
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@@ -243,7 -243,6 +243,7 @@@ bashcomp_DATA = a2x
psql \
puppet \
pwck \
+ pwd \
pwdx \
pwgen \
python \
@@@ -285,12 -284,12 +285,13 @@@
snownews \
sqlite3 \
ssh \
+ ssh-add \
ssh-copy-id \
sshfs \
sshmitm \
sshow \
strace \
+ sudo \
svk \
sync_members \
sysbench \
@@@ -301,7 -300,6 +302,7 @@@
tcpnice \
tracepath \
tune2fs \
+ udevadm \
umount \
umount.linux \
unace \
@@@ -500,6 -498,7 +501,7 @@@ CLEANFILES =
sparc-koji \
spovray \
stream \
+ sudoedit \
tightvncviewer \
tracepath6 \
typeset \
@@@ -645,6 -644,10 +647,6 @@@ symlinks
rm -f $(targetdir)/$$file && \
$(LN_S) java $(targetdir)/$$file ; \
done
- for file in pkill ; do \
- rm -f $(targetdir)/$$file && \
- $(LN_S) killall $(targetdir)/$$file ; \
- done
for file in arm-koji ppc-koji s390-koji sparc-koji ; do \
rm -f $(targetdir)/$$file && \
$(LN_S) koji $(targetdir)/$$file ; \
@@@ -711,10 -714,6 +713,10 @@@
rm -f $(targetdir)/$$file && \
$(LN_S) pkg_delete $(targetdir)/$$file ; \
done
+ for file in pkill ; do \
+ rm -f $(targetdir)/$$file && \
+ $(LN_S) pgrep $(targetdir)/$$file ; \
+ done
for file in pm-suspend pm-suspend-hybrid ; do \
rm -f $(targetdir)/$$file && \
$(LN_S) pm-hibernate $(targetdir)/$$file ; \
@@@ -772,6 -771,10 +774,10 @@@
rm -f $(targetdir)/$$file && \
$(LN_S) ssh $(targetdir)/$$file ; \
done
+ for file in sudoedit ; do \
+ rm -f $(targetdir)/$$file && \
+ $(LN_S) sudo $(targetdir)/$$file ; \
+ done
for file in tracepath6 ; do \
rm -f $(targetdir)/$$file && \
$(LN_S) tracepath $(targetdir)/$$file ; \
--
bash-completion
More information about the Bash-completion-commits
mailing list