Add pbzip2, pbunzip2, and pbzcat completions.
This commit is contained in:
parent
5d9e4f0c69
commit
08e746ea10
2
CHANGES
2
CHANGES
@ -30,7 +30,7 @@ bash-completion (2.x)
|
|||||||
vncviewer, yp-tools, and general hostname completions.
|
vncviewer, yp-tools, and general hostname completions.
|
||||||
* Add abook and wtf completion, based on work by Raphaël Droz.
|
* Add abook and wtf completion, based on work by Raphaël Droz.
|
||||||
* Add cvsps, dragon, fusermount, jarsigner, k3b, lftpget, pm-utils, rtcwake,
|
* Add cvsps, dragon, fusermount, jarsigner, k3b, lftpget, pm-utils, rtcwake,
|
||||||
pack200, unpack200, pigz and unpigz completions.
|
pack200, unpack200, pbzip2, pbunzip2, pbzcat, pigz and unpigz completions.
|
||||||
* Don't overwrite other host completions when completing from multiple
|
* Don't overwrite other host completions when completing from multiple
|
||||||
SSH known hosts files.
|
SSH known hosts files.
|
||||||
* Speed up installed rpm package completion on SUSE, based on work by
|
* Speed up installed rpm package completion on SUSE, based on work by
|
||||||
|
@ -69,7 +69,7 @@ complete -d pushd
|
|||||||
#
|
#
|
||||||
# START exclude -- do NOT remove this line
|
# START exclude -- do NOT remove this line
|
||||||
# bzcmp, bzdiff, bz*grep, bzless, bzmore intentionally not here, see Debian: #455510
|
# bzcmp, bzdiff, bz*grep, bzless, bzmore intentionally not here, see Debian: #455510
|
||||||
complete -f -X '!*.?(t)bz?(2)' bunzip2 bzcat
|
complete -f -X '!*.?(t)bz?(2)' bunzip2 bzcat pbunzip2 pbzcat
|
||||||
complete -f -X '!*.@(zip|ZIP|jar|JAR|exe|EXE|pk3|war|wsz|ear|zargo|xpi|sxw|ott|od[fgpst]|epub)' unzip zipinfo
|
complete -f -X '!*.@(zip|ZIP|jar|JAR|exe|EXE|pk3|war|wsz|ear|zargo|xpi|sxw|ott|od[fgpst]|epub)' unzip zipinfo
|
||||||
complete -f -X '*.Z' compress znew
|
complete -f -X '*.Z' compress znew
|
||||||
# zcmp, zdiff, z*grep, zless, zmore intentionally not here, see Debian: #455510
|
# zcmp, zdiff, z*grep, zless, zmore intentionally not here, see Debian: #455510
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# bash completion for bzip2
|
# bash completion for bzip2
|
||||||
|
|
||||||
have bzip2 &&
|
have bzip2 || have pbzip2 &&
|
||||||
_bzip2()
|
_bzip2()
|
||||||
{
|
{
|
||||||
local cur prev xspec helpopts
|
local cur prev xspec helpopts
|
||||||
@ -8,10 +8,16 @@ _bzip2()
|
|||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=`_get_cword`
|
cur=`_get_cword`
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
helpopts=`_parse_help bzip2`
|
helpopts=`_parse_help ${COMP_WORDS[0]}`
|
||||||
|
|
||||||
|
case $prev in
|
||||||
|
-b|-h|--help|-p)
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W "$helpopts -2 -3 -4 -5 -6 -7 -8 -9" \
|
COMPREPLY=( $( compgen -W "${helpopts//#/} -2 -3 -4 -5 -6 -7 -8 -9" \
|
||||||
-- "$cur" ) )
|
-- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@ -34,7 +40,7 @@ _bzip2()
|
|||||||
COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
|
COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
|
||||||
$( compgen -d -- "$cur" ) )
|
$( compgen -d -- "$cur" ) )
|
||||||
} &&
|
} &&
|
||||||
complete -F _bzip2 -o filenames bzip2
|
complete -F _bzip2 -o filenames bzip2 pbzip2
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# mode: shell-script
|
# mode: shell-script
|
||||||
|
Loading…
x
Reference in New Issue
Block a user