summaryrefslogtreecommitdiffstats
path: root/bash-completion
diff options
context:
space:
mode:
Diffstat (limited to 'bash-completion')
-rw-r--r--bash-completion16
1 files changed, 10 insertions, 6 deletions
diff --git a/bash-completion b/bash-completion
index f4c476b..b7ab5bc 100644
--- a/bash-completion
+++ b/bash-completion
@@ -2,18 +2,22 @@
# mkinitcpio bash completion by Seblu <seblu@seblu.net>
_lsinitcpio() {
- local action cur
- action="-a -h -n -v -x"
+ local cur opts
+ opts=(-a --analyze -h --help -n --nocolor -v --verbose -x --extract)
+
_get_comp_words_by_ref cur
- case "$cur" in
- -*) COMPREPLY=($(compgen -W "${action}" -- "$cur"));;
- *) _filedir;;
+
+ case $cur in
+ -*)
+ COMPREPLY=($(compgen -W "${opts[*]}" -- "$cur")) ;;
+ *)
+ _filedir ;;
esac
}
_find_kernel_versions() {
local -a matches
- local regex
+ local dir regex
# add completions from kernels in /boot
regex="Linux kernel.*version"