Merge branch 'master' into guillomovitch

This commit is contained in:
Guillaume Rousse 2009-03-30 22:02:55 +02:00
commit 0924d059c6
12 changed files with 275 additions and 263 deletions

8
AUTHORS Normal file
View File

@ -0,0 +1,8 @@
David Paleino (Debian) <d.paleino@gmail.com>
Freddy Vulto <fvulto@gmail.com>
Guillame Rousse (Mandriva) <Guillaume.Rousse@inria.fr>
Mike Kelly (Exherbo) <pioto@pioto.org>
Santiago M. Mola (Exherbo) <cooldwind@gmail.com>
Ville Skyttä (Fedora/Red Hat) <ville.skytta@iki.fi>
To contact us: bash-completion-devel@lists.alioth.debian.org

View File

@ -26,7 +26,7 @@
#
# http://bash-completion.alioth.debian.org/
#
# RELEASE: 200902xx
# RELEASE: 1.x
if [[ $- == *v* ]]; then
BASH_COMPLETION_ORIGINAL_V_VALUE="-v"
@ -107,8 +107,8 @@ complete -f -X '!*.@(dvi|DVI)?(.@(gz|Z|bz2))' kdvi
complete -f -X '!*.@(dvi|DVI)' dvips dviselect dvitype dvipdf advi dvipdfm dvipdfmx
complete -f -X '!*.@(pdf|PDF)' acroread gpdf xpdf
complete -f -X '!*.@(?(e)ps|?(E)PS|pdf|PDF)' kpdf
complete -f -X '!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2)|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX)' evince
complete -f -X '!*.@(?(e)ps|?(E)PS)' ps2pdf
complete -f -X '!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2)|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX)' evince okular
complete -f -X '!*.@(?(e)ps|?(E)PS|pdf|PDF)' ps2pdf ps2pdf12 ps2pdf13 ps2pdf14 ps2pdfwr
complete -f -X '!*.texi*' makeinfo texi2html
complete -f -X '!*.@(?(la)tex|?(LA)TEX|texi|TEXI|dtx|DTX|ins|INS)' tex latex slitex jadetex pdfjadetex pdftex pdflatex texi2dvi
complete -f -X '!*.@(mp3|MP3)' mpg123 mpg321 madplay
@ -274,15 +274,19 @@ _filedir()
local toks=( ) 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,
# because quotes-in-comments-in-a-subshell cause errors on
# bash-3.1. See also:
# http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html
toks=( ${toks[@]-} $(
compgen -d -- "$(quote_readline "$cur")" | {
while read -r tmp; do
# TODO: I've removed a "[ -n $tmp ] &&" before,
# 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
echo $tmp
done
}
@ -428,6 +432,33 @@ _pgids()
COMPREPLY=( $( compgen -W '$( command ps axo pgid | sed 1d )' -- $cur ))
}
# This function completes on process names.
# AIX and SunOS prefer X/Open, all else should be BSD.
[ $UNAME = SunOS -o $UNAME = AIX ] &&
_pnames()
{
COMPREPLY=( $( compgen -W '$( command ps -efo comm | \
sed -e 1d -e "s:.*/::" -e "s/^-//" \
-e "s/^<defunct>$//")' \
-- $cur ) )
} ||
_pnames()
{
# FIXME: completes "[kblockd/0]" to "0". Previously it was completed
# to "kblockd" which isn't correct either. "kblockd/0" would be
# arguably most correct, but killall from psmisc 22 treats arguments
# containing "/" specially unless -r is given so that wouldn't quite
# work either. Perhaps it'd be best to not complete these to anything
# for now.
# Not using "ps axo comm" because under some Linux kernels, it
# truncates command names (see e.g. http://bugs.debian.org/497540#19)
COMPREPLY=( $( compgen -W '$( command ps axo command | \
sed -e "1d; s/ .*//; s:.*/::; s/:$//;" \
-e "s/^[[(-]//; s/[])]$//" \
-e "s/^<defunct>$//")' \
-- $cur ) )
}
# This function completes on user IDs
#
_uids()
@ -510,6 +541,25 @@ _usergroup()
fi
}
# Get real command.
# - arg: $1 Command
# - stdout: Filename of command in PATH with possible symbolic links resolved.
# Empty string if command not found.
# - return: True (0) if command found, False (> 0) if not.
_realcommand() {
type -P "$1" > /dev/null && {
if type -p realpath > /dev/null; then
realpath "$(type -P "$1")"
elif type -p readlink > /dev/null; then
readlink -f "$(type -P "$1")"
else
type -P "$1"
fi
}
}
# this function count the number of mandatory args
#
_count_args()
@ -547,7 +597,7 @@ _alias()
local cur
COMPREPLY=()
cur=${COMP_WORDS[$COMP_CWORD]}
cur=`_get_cword`
case "$COMP_LINE" in
*[^=])
@ -1015,9 +1065,9 @@ _kill()
}
complete -F _kill kill
# Linux and FreeBSD killall(1) completion.
# killall(1) (Linux and FreeBSD) and pkill(1) completion.
#
[ $UNAME = Linux -o $UNAME = FreeBSD ] &&
[ $UNAME = Linux -o $UNAME = FreeBSD ] || have pkill &&
_killall()
{
local cur
@ -1028,20 +1078,17 @@ _killall()
if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then
_signals
else
COMPREPLY=( $( compgen -W '$( command ps axo command | \
sed -e "1d; s/ .*//; s:^/.*/::; s/:$//;" \
-e "s/^[[(-]//; s/[])]$//; s:/.*::" \
-e "s/^<defunct>$//")' \
-- $cur ) )
_pnames
fi
return 0
}
[ $UNAME = Linux -o $UNAME = FreeBSD ] && complete -F _killall killall pkill
[ $UNAME = Linux -o $UNAME = FreeBSD ] && complete -F _killall killall
have pkill && complete -F _killall pkill
# Linux and FreeBSD pgrep(1) completion.
# pgrep(1) completion.
#
[ $UNAME = Linux -o $UNAME = FreeBSD ] &&
[ $UNAME = Linux ] || have pgrep &&
_pgrep()
{
local cur
@ -1049,13 +1096,12 @@ _pgrep()
COMPREPLY=()
cur=`_get_cword`
COMPREPLY=( $( compgen -W '$( command ps axo command | \
sed -ne "1d; s/^\[\?\([^-][^] ]*\).*$/\1/p" | \
sed -e "s/.*\///" )' -- $cur ) )
_pnames
return 0
}
[ $UNAME = Linux -o $UNAME = FreeBSD ] && complete -F _pgrep pgrep
have pgrep && complete -F _pgrep pgrep
# Linux pidof(8) completion.
[ $UNAME = Linux ] && complete -F _pgrep pidof
@ -2018,6 +2064,11 @@ _rpm()
'%{requirename}\n' | grep "^$cur" ) )
return 0
;;
--target)
COMPREPLY=( $( compgen -W "$( command rpm --showrc | sed -ne \
's/^\s*compatible\s\+build\s\+archs\s*:\s*\(.*\)/\1/ p' )" -- $cur ) )
return 0
;;
esac
case "${COMP_WORDS[1]}" in
@ -2128,8 +2179,7 @@ _rpm()
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--short-circuit --timecheck \
--clean --rmsource --rmspec --test --sign --buildroot \
--target -- buildarch --buildos --nobuild --nodeps \
--nodirtokens' -- $cur ) )
--target --nobuild --nodeps --nodirtokens' -- $cur ) )
elif [[ ${COMP_WORDS[1]} == -b* ]]; then
_filedir 'spec'
else
@ -2952,7 +3002,7 @@ _tar()
;;
+([^IZzJjy])f)
ext='t@(ar?(.@(Z|gz|bz?(2)|lz?(ma)))|gz|bz?(2)|lz?(ma))'
regex='t\(ar\(\.\(Z\|gz\|bz2\?\|lzma\)\)\?\|gz\|bz2\?\|lzma\)'
regex='t\(ar\(\.\(Z\|gz\|bz2\?\|lzma\|xz\)\)\?\|gz\|bz2\?\|lzma\|xz\)'
;;
*[Zz]*f)
ext='t?(ar.)@(gz|Z)'
@ -2963,8 +3013,8 @@ _tar()
regex='t\(ar\.\)\?bz2\?'
;;
*[J]*f)
ext='t?(ar.)lz?(ma)'
regex='t\(ar\.\)\?lzma\?'
ext='t?(ar.)@(lz?(ma)|xz)'
regex='t\(ar\.\)\?\(lzma\|xz\)\?'
;;
*)
_filedir
@ -3015,7 +3065,7 @@ _jar()
_filedir
;;
*f)
_filedir '?(e|j|w)ar'
_filedir '?([ejw]ar|zip|[EJW]AR|ZIP)'
;;
*)
_filedir
@ -5772,7 +5822,7 @@ _mplayer()
return 0
;;
-audiofile)
_filedir '@(mp3|MP3|mpg|MPG|ogg|OGG|w?(a)v|W?(A)V|mid|MID|flac|FLAC|mka|MKA)'
_filedir '@(mp3|MP3|mpg|MPG|ogg|OGG|w?(a)v|W?(A)V|mid|MID|flac|FLAC|mka|MKA|ape|APE)'
return 0
;;
-font)
@ -5992,8 +6042,7 @@ _mplayer()
return 0
;;
-profile)
local profiles=$(sed -ne 's|\[\(.*\)\]|\1|p' ~/.mplayer/config)
COMPREPLY=( $( compgen -W "$profiles" -- $cur))
_mplayer_options_list $cmd $prev
return 0
;;
esac
@ -6069,7 +6118,7 @@ _mplayer()
-xvidencopts -of --verbose' -- $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|m2v|M2V|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)'
_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|m2v|M2V|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)'
;;
esac
@ -8994,35 +9043,6 @@ _smartctl()
complete -F _smartctl smartctl
}
# vncviewer(1) completion
#
have vncviewer &&
_vncviewer()
{
local cur prev
local -a config
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case "$prev" in
-via)
_known_hosts -a
;;
*)
# ssh into the the server, find and ping the broadcast address, then
# sort and show the results.
COMPREPLY=( $( ssh -o 'Batchmode yes' $prev \
"ping -bnc 4 255.255.255.255" 2>/dev/null | \
awk -F ' ' '{print $4}' | \
sort -n | uniq | egrep '[0-9]+\.[0-9]+\.' 2>/dev/null ) )
esac
return 0
} &&
complete -F _vncviewer vncviewer
# sysctl(8) completion
#
have sysctl &&

16
bash_completion.sh Executable file → Normal file
View File

@ -1,16 +1,12 @@
# Check for bash (and that we haven't already been sourced).
[ -z "$BASH_VERSION" -o -n "$BASH_COMPLETION" ] && return
# Check for interactive bash and that we haven't already been sourced.
[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION" ] && return
# Check for recent enough version of bash.
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
# Check for interactive shell.
if [ -n "$PS1" ]; then
if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then
if [ -r /etc/bash_completion ]; then
# Source completion code.
. /etc/bash_completion
fi
if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then
if [ -r /etc/bash_completion ]; then
# Source completion code.
. /etc/bash_completion
fi
fi
unset bash bminor bmajor

View File

@ -1,7 +1,7 @@
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
# ex: ts=8 sw=8 noet filetype=sh
#
# bash completion for brtcl
# bash completion for brctl
have brctl &&
_brctl()

View File

@ -1,135 +0,0 @@
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
# ex: ts=8 sw=8 noet filetype=sh
#
# Mercurial completion by Alexis S. L. Carvalho <alexis@cecm.usp.br>
#
# See: http://www.selenic.com/pipermail/mercurial/2005-August/003378.html
_hg_commands()
{
local commands="$(hg -v help | sed -e '1,/^list of commands:/d' \
-e '/^global options:/Q' \
-e '/^ [^ ]/!d; s/[,:]//g;')"
# hide debug commands from users, but complete them if
# specifically asked for
if [[ "$cur" == de* ]]; then
commands="$commands debugcheckstate debugstate debugindex"
commands="$commands debugindexdot debugwalk"
fi
COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$commands" -- "$cur") )
}
_hg_paths()
{
local paths="$(hg paths | sed -e 's/ = .*$//')"
COMPREPLY=(${COMPREPLY[@]:-} $( compgen -W "$paths" -- "$cur" ))
}
_hg_tags()
{
local tags="$(hg tags | sed -e 's/[0-9]*:[a-f0-9]\{40\}$//; s/ *$//')"
COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$tags" -- "$cur") )
}
# this is "kind of" ugly...
_hg_count_non_option()
{
local i count=0
local filters="$1"
for (( i=1; $i<=$COMP_CWORD; i++ )); do
if [[ "${COMP_WORDS[i]}" != -* ]]; then
for f in $filters; do
if [[ ${COMP_WORDS[i-1]} == $f ]]; then
continue 2
fi
done
count=$(($count + 1))
fi
done
echo $(($count - 1))
}
_hg()
{
local cur prev cmd opts i
COMPREPLY=()
cur="$2"
prev="$3"
# searching for the command
# (first non-option argument that doesn't follow -R/--repository)
for (( i=1; $i<=$COMP_CWORD; i++ )); do
if [[ ${COMP_WORDS[i]} != -* ]] \
&& [ "${COMP_WORDS[i-1]}" != -R ] \
&& [ "${COMP_WORDS[i-1]}" != --repository ]; then
cmd="${COMP_WORDS[i]}"
break
fi
done
if [[ "$cur" == -* ]]; then
opts="$(hg -v help | sed -e '1,/^global options/d; /^ -/!d')"
if [ -n "$cmd" ]; then
opts="$opts $(hg help "$cmd" | sed -e '/^ -/!d; s/ [^-][^ ]*//')"
fi
COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$opts" -- "$cur") )
return
fi
if [ "$prev" = -R ] || [ "$prev" = --repository ]; then
COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" ))
return
fi
if [ -z "$cmd" ] || [ $COMP_CWORD -eq $i ]; then
_hg_commands
return
fi
if [ "$cmd" != status ] && [ "$prev" = -r ] || [ "$prev" = --rev ]; then
_hg_tags
return
fi
case "$cmd" in
help)
_hg_commands
;;
export|manifest|update|checkout|up|co)
_hg_tags
;;
pull|push)
_hg_paths
COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" ))
;;
paths)
_hg_paths
;;
clone)
local count=$(_hg_count_non_option)
if [ $count = 1 ]; then
_hg_paths
fi
COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" ))
;;
cat)
local count=$(_hg_count_non_option -o --output)
if [ $count = 2 ]; then
_hg_tags
else
COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" ))
fi
;;
*)
COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" ))
;;
esac
}
complete -o filenames -F _hg hg

View File

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

View File

@ -4,7 +4,7 @@
# bash completion for net tools
have mii-tool &&
_mii-tool()
_mii_tool()
{
local cur prev
@ -55,10 +55,10 @@ _mii-tool()
_available_interfaces -a
fi
} &&
complete -F _mii-tool $default mii-tool
complete -F _mii_tool $default mii-tool
have mii-diag &&
_mii-diag()
_mii_diag()
{
local cur prev
@ -86,4 +86,4 @@ _mii-diag()
_available_interfaces -a
fi
} &&
complete -F _mii-diag $default mii-diag
complete -F _mii_diag $default mii-diag

View File

@ -34,16 +34,17 @@ _rdesktop()
return 0
;;
-r)
# FIXME: should do $nospace for the colon options
COMPREPLY=( $( compgen -W 'comport: disk: lptport: \
printer: sound: lspc scard' -- $cur ) )
printer: sound: lspci scard' -- $cur ) )
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-u -d -s -c -p -n -k -g -f -b -A -B \
-e -E -m -C -D -K -S -T -N -X -a -z -X -P -r -0 -4 -5' \
-- $cur ) )
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 ) )
else
_known_hosts
fi

126
contrib/vncviewer Normal file
View File

@ -0,0 +1,126 @@
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
# ex: ts=8 sw=8 noet filetype=sh
#
# bash completion for vncviewer
_vncviewer_bootstrap() {
local fname
case "$(_realcommand vncviewer)" in
# If `vncviewer' not installed, default file-dir completion
'') _filedir `_get_cword` ;;
*xvnc4viewer) fname=_xvnc4viewer ;;
*tightvncviewer|*) fname=_tightvncviewer ;;
esac
if [ $fname ]; then
# Install real completion for subsequent completions
complete -F $fname vncviewer
$fname # Generate completions once for now
unset -f _vncviewer_bootstrap
fi
} &&
complete -F _vncviewer_bootstrap vncviewer
_tightvncviewer()
{
local cur prev
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
-passwd)
_filedir
return 0
;;
-encodings)
COMPREPLY=( $( compgen -W 'copyrect tight hextile zlib \
corre rre raw' -- $cur ) )
return 0
;;
-via)
_known_hosts
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-help -listen -via -shared -noshared\
-viewonly -fullscreen -noraiseonbeep -passwd -encodings\
-bgr233 -owncmap -truecolour -truecolor -depth \
-compresslevel -quality -nojpeg -nocursorshape \
-x11cursor' -- $cur ) )
else
_known_hosts
fi
} &&
complete -F _tightvncviewer tightvncviewer
# NOTE: - VNC Viewer options are case-insensivite. Preferred case is taken from -help.
# - Both single dash (-) and double dash (--) are allowed as option prefix
_xvnc4viewer()
{
local cur prev
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
# Convert double dash to single dash
case ${prev/#--/-} in
# -passwd, -PasswordFile
-[pP][aA][sS][sS][wW][dD]|-[pP][aA][sS][sS][wW][oO][rR][dD][fF][iI][lL][eE])
_filedir
return 0
;;
# -PreferredEncoding
-[pP][rR][eE][fF][eE][rR][rR][eE][dD][eE][nN][cC][oO][dD][iI][nN][gG])
COMPREPLY=( $( compgen -W 'zrle hextile raw' -- $cur ) )
return 0
;;
# -via
-[vV][iI][aA])
_known_hosts
return 0
;;
esac
if [[ "$cur" == -* || "$cur" == --* ]]; then
# Default to vncviewer camelcase options, see `vncviewer -help'
local dash options=( \
AcceptClipboard AutoSelect DebugDelay display \
DotWhenNoCursor FullColor FullColour FullScreen \
geometry help listen Log \
LowColourLevel MenuKey name Parent \
passwd PasswordFile PointerEventInterval PreferredEncoding \
SendClipboard SendPrimary Shared UseLocalCursor \
via ViewOnly WMDecorationHeight WMDecorationWidth \
ZlibLevel \
)
[[ "$cur" == --* ]] && dash=-- || dash=-
# Is a `nocasematch' variable available (bash > v3.1)?
if shopt nocasematch 2> /dev/null | grep -q ^nocasematch; then
# Variable `nocasematch' is available
# Use vncviewer camelcase options
local option oldNoCaseMatch=$(shopt -p nocasematch)
shopt -s nocasematch
COMPREPLY=( $( for option in "${options[@]}"; do
[[ $dash$option == "$cur"* ]] && echo $dash$option
done ) )
eval "$oldNoCaseMatch" 2> /dev/null
else
# Variable 'nocasematch' isn't available;
# Convert completions to lowercase
COMPREPLY=( $( compgen -W "$(
echo ${options[@]/#/$dash} | tr [:upper:] [:lower:]
)" -- "$(echo "$cur" | tr [:upper:] [:lower:])" ) )
fi
else
_known_hosts
fi
} &&
complete -F _xvnc4viewer xvnc4viewer

42
debian/changelog vendored
View File

@ -1,4 +1,11 @@
bash-completion (200902xx) UNRELEASED; urgency=low
bash-completion (1:1.x) UNRELEASED; urgency=low
[ David Paleino ]
* Prepare for future development.
-- David Paleino <d.paleino@gmail.com> Wed, 25 Mar 2009 23:18:24 +0100
bash-completion (1:1.0-1) UNRELEASED; urgency=low
[ Guillaume Rousse ]
* Make bibtex complete on .aux files
@ -10,6 +17,8 @@ bash-completion (200902xx) UNRELEASED; urgency=low
* Added net-tools (mii-tool and mii-diag) completions
* Added minicom completion
* Added quota-tools completion
* Added rdesktop completion
* Added tightvncviewer completion
[ David Paleino ]
* Added .kar to Timidity completion.
@ -74,6 +83,9 @@ bash-completion (200902xx) UNRELEASED; urgency=low
* Added to_review/ directory, where completions needing a review would
go. After it gets accepted, the completion would go into contrib/.
* Remove unused UNAME local variable in _info() (Closes: #501843)
* AUTHORS added
* Make _alias() use _get_cword
* Added .zip to jar completions (Closes: #521041)
* Merge from Gentoo:
- fix 'find' completion so that it properly completes on -?(i)whilename.
Patch by Ciaran McCreesh.
@ -122,6 +134,21 @@ bash-completion (200902xx) UNRELEASED; urgency=low
* Fix awk error in "modprobe -r /" completion (Closes: #512556).
* Expand ~foo to dir name more eagerly to avoid quoting issues.
* Fix -sourcepath handling in javadoc packages completion.
* Extract process name completion from _killall to _pnames, make it work
for others than Linux and FreeBSD.
* Fix process name completion with relative paths (RHBZ: #484578).
* Use improved process name completion in pgrep in addition to killall.
* Enable pgrep and pkill completion if the commands are available, not just
on Linux and FreeBSD.
* Drop hg completion, an improved version is shipped with Mercurial
(contrib/bash_completion in the tarball).
* Make okular complete on same files as evince, thanks to Mary Ellen Foster
(RHBZ: #486998).
* Apply ps2pdf completion to ps2pdf{12,13,14,wr} too.
* Simplify bash_completion.sh, return earlier in non-applicable environments.
* Remove obsolete --buildarch and --buildos rpm(build) completions.
* Add rpmbuild --target completion.
* Use "-profile help" to get mplayer and friends -profile completions.
[ Freddy Vulto ]
* Restored `_display()' completion for `display' by removing
@ -129,8 +156,19 @@ bash-completion (200902xx) UNRELEASED; urgency=low
* Removed duplicate completion option `-borderwidth' for `display'
* Prevent completion dir from being sourced twice if
BASH_COMPLETION_DIR and BASH_COMPLETION_COMPAT_DIR are equal (Alioth#311433)
* Make `_mii-tool()' and `_mii-diag()' POSIX-compliant
* Fix _isql completion waiting for grep input if $ODBCINI not set; handle
whitespace in $ODBCINI.
* Split vncviewer completion in _tightvncviewer() and _xvnc4viewer()
Added _realcommand() global function.
-- David Paleino <d.paleino@gmail.com> Thu, 05 Feb 2009 10:52:42 +0100
[ Jakob Unterwurzacher ]
* ps2pdf can run on .pdf files as well. (Closes: #516614, LP: #316943)
[ Santiago M. Mola ]
* Add .ape to mplayer supported extensions (Alioth#311510).
-- David Paleino <d.paleino@gmail.com> Wed, 25 Mar 2009 23:18:24 +0100
bash-completion (20080705) unstable; urgency=low

View File

@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "DH_BASH-COMPLETION 1"
.TH DH_BASH-COMPLETION 1 "2009-01-29" "200902xx" "Bash-Completion Debhelper"
.TH DH_BASH-COMPLETION 1 "2009-01-29" "1.x" "Bash-Completion Debhelper"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,42 +0,0 @@
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
# ex: ts=8 sw=8 noet filetype=sh
#
# bash completion for vncviewer
have vncviewer &&
_vncviewer()
{
local cur prev
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
-passwd)
_filedir
return 0
;;
-encodings)
COMPREPLY=( $( compgen -W 'copyrect tight hextile zlib \
corre rre raw' -- $cur ) )
return 0
;;
-via)
_known_hosts
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-help -listen -via -shared -noshared\
-viewonly -fullscreen -noraiseonbeep -passwd -encodings\
-bgr233 -owncmap -truecolour -truecolor -depth \
-compresslevel -quality -nojpeg -nocursorshape \
-x11cursor' -- $cur ) )
else
_known_hosts
fi
} &&
complete -F _vncviewer vncviewer