diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-06-27 05:07:36 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-06-30 20:17:37 +0200 |
commit | 197ee5d21d5098ccaeb1d804256ac49c0aad619f (patch) | |
tree | c18241a22141ac4a28c55f3c91d3ea879c058aec /bash-completion | |
parent | 7f2b324b93bb152f5b9a1be6d15f12a46e5e9360 (diff) | |
download | mkinitcpio-197ee5d21d5098ccaeb1d804256ac49c0aad619f.tar.gz mkinitcpio-197ee5d21d5098ccaeb1d804256ac49c0aad619f.tar.xz |
bash-completion: match style to rest of code
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'bash-completion')
-rw-r--r-- | bash-completion | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bash-completion b/bash-completion index 2a53c1a..9ede30f 100644 --- a/bash-completion +++ b/bash-completion @@ -1,7 +1,7 @@ +#!/bin/bash # mkinitcpio bash completion by Seblu <seblu@seblu.net> -_lsinitcpio () -{ +_lsinitcpio() { local action cur action="-a -h -v -x" _get_comp_words_by_ref cur @@ -25,8 +25,7 @@ _find_kernel_versions() { $(compgen -W "${matches[*]}" -- $cur)) } -_mkinitcpio () -{ +_mkinitcpio() { local action cur prev action="-c -k -s -b -g -p -S -v -M -L -H -h" _get_comp_words_by_ref cur prev @@ -36,9 +35,10 @@ _mkinitcpio () -b) COMPREPLY=($(compgen -d "$cur" -- $cur));; -p) COMPREPLY=($(cd /etc/mkinitcpio.d/ && compgen -X '!*.preset' -f -- $cur|sed 's/\.preset//'));; -H|-S) COMPREPLY=($(cd /lib/initcpio/install/ && compgen -f -- $cur));; - *) COMPREPLY=($(compgen -W "${action}" -- "$cur"));; + *) COMPREPLY=($(compgen -W "${action}" -- "$cur"));; esac } + complete -F _mkinitcpio mkinitcpio complete -F _lsinitcpio lsinitcpio |