Skip to content

Commit af68839

Browse files
committed
make bash autocomplete more dynamic
Signed-off-by: Zen <[email protected]>
1 parent 0666b90 commit af68839

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

completion/ugrd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ _ugrd_autocomplete() {
44
local cur prev args
55
cur="${COMP_WORDS[COMP_CWORD]}"
66
prev="${COMP_WORDS[COMP_CWORD-1]}"
7-
args="--build-logging --no-build-logging -c --config --kernel-version --kver --clean --no-clean --validate --no-validate --hostonly --no-hostonly\
8-
--lspci --no-lspci --lsmod --no-lsmod --firmware --no-firmware --autodetect-root --no-autodetect-root --autodetect-root-luks\
9-
--no-autodetect-root-luks --print-config -d --debug --help -h -dd --verbose --log-file --log-level -v --version"
7+
args="-c --config --kernel-version --kver --log-file --log-level"
8+
while read -r option _; do
9+
args+=" ${option}"
10+
done <<< "$(ugrd --dump_args)"
1011

1112
COMPREPLY=()
12-
1313
case "${prev}" in
1414
--config|-c)
1515
mapfile -t COMPREPLY < <(compgen -f -- "${cur}")

0 commit comments

Comments
 (0)