Skip to content

Commit 1199f99

Browse files
aafeijoo-susejohannbg
authored andcommitted
fix(shell-completion): add missing options
1 parent 0b339d7 commit 1199f99

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

shell-completion/bash/dracut

+22-5
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,32 @@ _dracut() {
3333
--xz --zstd --no-compress --gzip --list-modules --show-modules --keep
3434
--printsize --regenerate-all --noimageifnotneeded --early-microcode
3535
--no-early-microcode --print-cmdline --reproducible --uefi
36-
--enhanced-cpio'
37-
[ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers
36+
--enhanced-cpio --rebuild --aggresive-strip --hostonly-cmdline
37+
--no-hostonly-cmdline --no-hostonly-default-device --nofscks
38+
--hostonly-i18n --no-hostonly-i18n --lzo --lz4 --no-reproducible
39+
--no-uefi --no-machineid --version
40+
'
41+
[ARG]='-a -m -o -d -I -k -c -L -r -i
42+
--kver --add --force-add --add-drivers --force-drivers
3843
--omit-drivers --modules --omit --drivers --filesystems --install
39-
--fwdir --libdirs --fscks --add-fstab --mount --device --nofscks
44+
--fwdir --libdirs --fscks --add-fstab --mount --device
4045
--kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix
4146
--kernel-cmdline --sshkey --persistent-policy --install-optional
4247
--loginstall --uefi-stub --kernel-image --squash-compressor
48+
--sysroot --hostonly-mode --hostonly-nics --include --logfile
49+
--uefi-splash-image
4350
'
4451
)
4552

4653
# shellcheck disable=SC2086
4754
if __contains_word "$prev" ${OPTS[ARG]}; then
4855
case $prev in
49-
--kmoddir | -k | --fwdir | --confdir | --tmpdir)
56+
--kmoddir | -k | --fwdir | --confdir | --tmpdir | -r | --sysroot)
5057
comps=$(compgen -d -- "$cur")
5158
compopt -o filenames
5259
;;
53-
-c | --conf | --sshkey | --add-fstab | --add-device | -I | --install | --install-optional)
60+
-c | --conf | --sshkey | --add-fstab | --add-device | -I | \
61+
--install | --install-optional | --uefi-splash-image)
5462
comps=$(compgen -f -- "$cur")
5563
compopt -o filenames
5664
;;
@@ -69,6 +77,15 @@ _dracut() {
6977
echo [0-9]*
7078
)
7179
;;
80+
--hostonly-mode)
81+
comps="sloppy strict"
82+
;;
83+
--hostonly-nics)
84+
comps=$(
85+
cd /sys/class/net/ || return 0
86+
printf -- "%s " *
87+
)
88+
;;
7289
*)
7390
return 0
7491
;;

shell-completion/bash/lsinitrd

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ __contains_word() {
2525
_lsinitrd() {
2626
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD - 1]}
2727
local -A OPTS=(
28-
[STANDALONE]='-s --size -h --help'
28+
[STANDALONE]='-s --size -h --help --unpack --unpackearly -v --verbose'
2929
[ARG]='-f --file -k --kver'
3030
)
3131

0 commit comments

Comments
 (0)