diff options
Diffstat (limited to 'bash-completion')
-rw-r--r-- | bash-completion | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/bash-completion b/bash-completion index e7c1db0..a0f07dc 100644 --- a/bash-completion +++ b/bash-completion @@ -25,21 +25,15 @@ _lsinitcpio() { _find_kernel_versions() { local -a matches - local dir f + local dir f kver for f in /boot/*; do # only match regular files which pass validation if [[ ! -L $f && -f $f ]] && kver=$(_detect_kver "$f"); then - matches+=("$f") + matches+=("$f" "$kver") fi done - # add completions based on kernel versions in /lib/modules - for dir in /lib/modules/*/kernel; do - dir=${dir%/kernel} - matches+=("${dir#/lib/modules/}") - done - COMPREPLY=($(compgen -W "${matches[*]}" -- $cur)) } |