mkinitrd reviewed, move to contrib.
This commit is contained in:
parent
62660ae61a
commit
8df2728adf
3
CHANGES
3
CHANGES
@ -25,6 +25,9 @@ bash-completion (1.x)
|
||||
[ Mike Kelly ]
|
||||
* Fix _filedir on bash 4.
|
||||
|
||||
[ Guillaume Rousse ]
|
||||
* Split mkinitrd completion to contrib/mkinitrd, improve it.
|
||||
|
||||
-- David Paleino <d.paleino@gmail.com> Wed, 25 Mar 2009 23:18:24 +0100
|
||||
|
||||
bash-completion (1.0)
|
||||
|
@ -26,6 +26,7 @@ bashcomp_DATA = contrib/apache2ctl \
|
||||
contrib/mailman \
|
||||
contrib/mcrypt \
|
||||
contrib/minicom \
|
||||
contrib/mkinitrd \
|
||||
contrib/modules \
|
||||
contrib/monodevelop \
|
||||
contrib/mplayer \
|
||||
|
@ -8108,69 +8108,6 @@ _lvm()
|
||||
complete -F _lvm lvm
|
||||
}
|
||||
|
||||
# mkinitrd(8) completion
|
||||
#
|
||||
have mkinitrd &&
|
||||
_mkinitrd()
|
||||
{
|
||||
local cur args
|
||||
|
||||
COMPREPLY=()
|
||||
cur=`_get_cword`
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
# --name value style option
|
||||
case "$prev" in
|
||||
--preload)
|
||||
_modules
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# --name=value style option
|
||||
if [[ "$cur" == *=* ]]; then
|
||||
prev=${cur/=*/}
|
||||
cur=${cur/*=/}
|
||||
case "$prev" in
|
||||
--@(with|builtin))
|
||||
_modules
|
||||
return 0
|
||||
;;
|
||||
--@(fstab|dsdt))
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
--tmpdir)
|
||||
_filedir -d
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '--version -v -f --preload \
|
||||
--with= --omit-scsi-modules --omit-raid-modules \
|
||||
--images-version --fstab= --nocompress --builtin= \
|
||||
--nopivot --noudev --allow-missing --tmpdir= \
|
||||
--initrdfs= --dsdt= --lvm-version= --froce-usb' \
|
||||
-- $cur ) )
|
||||
else
|
||||
_count_args
|
||||
|
||||
case $args in
|
||||
1)
|
||||
_filedir
|
||||
;;
|
||||
2)
|
||||
COMPREPLY=( $( command ls /lib/modules | grep "^$cur" ) )
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
} &&
|
||||
complete -F _mkinitrd mkinitrd
|
||||
|
||||
# pkgconfig(1) completion
|
||||
#
|
||||
have pkg-config &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user