completion (improvement): dmidecode lint fixed
parent
a3ae37b385
commit
e481eb41e5
|
|
@ -69,6 +69,7 @@ completion/available/composer.completion.bash
|
||||||
completion/available/conda.completion.bash
|
completion/available/conda.completion.bash
|
||||||
completion/available/consul.completion.bash
|
completion/available/consul.completion.bash
|
||||||
completion/available/django.completion.bash
|
completion/available/django.completion.bash
|
||||||
|
completion/available/dmidecode.completion.bash
|
||||||
completion/available/docker.completion.bash
|
completion/available/docker.completion.bash
|
||||||
completion/available/docker-machine.completion.bash
|
completion/available/docker-machine.completion.bash
|
||||||
completion/available/gcloud.completion.bash
|
completion/available/gcloud.completion.bash
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,19 @@
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
function __dmidecode_completion() {
|
function __dmidecode_completion() {
|
||||||
local prev=$(_get_pword)
|
local prev=$(_get_pword)
|
||||||
local curr=$(_get_cword)
|
local curr=$(_get_cword)
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
-s | --string | -t | --type)
|
-s | --string | -t | --type)
|
||||||
OPTS=$(dmidecode $prev 2>&1 | grep -E '^ ' | sed 's/ *//g')
|
OPTS=$(dmidecode "$prev" 2>&1 | grep -E '^ ' | sed 's/ *//g')
|
||||||
COMPREPLY=($(compgen -W "$OPTS" -- "$curr"))
|
# shellcheck disable=SC2207
|
||||||
;;
|
COMPREPLY=($(compgen -W "$OPTS" -- "$curr"))
|
||||||
dmidecode)
|
;;
|
||||||
COMPREPLY=($(compgen -W "-d --dev-mem -h --help -q --quiet -s --string -t --type -H --handle -u --dump{,-bin} --from-dump --no-sysfs --oem-string -V --version" -- "$curr"))
|
dmidecode)
|
||||||
;;
|
# shellcheck disable=SC2207
|
||||||
|
COMPREPLY=($(compgen -W "-d --dev-mem -h --help -q --quiet -s --string -t --type -H --handle -u --dump{,-bin} --from-dump --no-sysfs --oem-string -V --version" -- "$curr"))
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue