summaryrefslogtreecommitdiffstats
path: root/completions/lilo
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
commitf2621414ee5f2f601424c22f00e207903e3b6104 (patch)
tree56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/lilo
parentAdding debian version 1:2.11-8. (diff)
downloadbash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz
bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--completions/lilo39
1 files changed, 18 insertions, 21 deletions
diff --git a/completions/lilo b/completions/lilo
index af8539a..6df8566 100644
--- a/completions/lilo
+++ b/completions/lilo
@@ -1,66 +1,63 @@
# bash completion for lilo(8) -*- shell-script -*-
-_lilo_labels()
+_comp_cmd_lilo__labels()
{
- COMPREPLY=($(compgen -W "$(awk -F= '$1 ~ /^[ \t]*label$/ {print $2}' \
- ${1:-/etc/lilo.conf} 2>/dev/null | command sed -e 's/\"//g')" \
- -- "$cur"))
+ _comp_compgen_split -- "$(_comp_awk -F = '$1 ~ /^[ \t]*label$/ {print $2}' \
+ "${1:-/etc/lilo.conf}" 2>/dev/null | command sed -e 's/\"//g')"
}
-_lilo()
+_comp_cmd_lilo()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
-C | -i | -m | -s | -S)
- _filedir
+ _comp_compgen_filedir
return
;;
-r)
- _filedir -d
+ _comp_compgen_filedir -d
return
;;
-I | -D | -R)
# label completion
- local i conf
+ local i conf=""
for i in "${!words[@]}"; do
if [[ ${words[i]} == -C ]]; then
- conf=${words[i + 1]}
+ conf=${words[i + 1]-}
break
fi
done
- _lilo_labels $conf
+ _comp_cmd_lilo__labels "$conf"
return
;;
-A | -b | -M | -u | -U)
# device completion
- cur=${cur:=/dev/}
- _filedir
+ _comp_compgen -c "${cur:-/dev/}" filedir
return
;;
-T)
# topic completion
- COMPREPLY=($(compgen -W 'help ChRul EBDA geom geom= table=
- video' -- "$cur"))
+ _comp_compgen -- -W 'help ChRul EBDA geom geom= table= video'
return
;;
-B)
- _filedir bmp
+ _comp_compgen_filedir bmp
return
;;
-E)
- _filedir '@(bmp|dat)'
+ _comp_compgen_filedir '@(bmp|dat)'
return
;;
esac
if [[ $cur == -* ]]; then
# relevant options completion
- COMPREPLY=($(compgen -W '-A -B -b -c -C -d -E -f -g -i -I -l -L -m -M
- -p -P -q -r -R -s -S -t -T -u -U -v -V -w -x -z' -- "$cur"))
+ _comp_compgen -- -W '-A -B -b -c -C -d -E -f -g -i -I -l -L -m -M -p -P
+ -q -r -R -s -S -t -T -u -U -v -V -w -x -z'
fi
} &&
- complete -F _lilo lilo
+ complete -F _comp_cmd_lilo lilo
# ex: filetype=sh