summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-06-27 05:08:06 +0200
committerDave Reisner <dreisner@archlinux.org>2011-06-30 20:17:37 +0200
commitea07e5a3e7a5fd76b0eb71909ca87ad830cf1be8 (patch)
tree981a40d722f3ffb00d5960a43410e2e0f11f83b7
parent197ee5d21d5098ccaeb1d804256ac49c0aad619f (diff)
downloadmkinitcpio-ea07e5a3e7a5fd76b0eb71909ca87ad830cf1be8.tar.gz
mkinitcpio-ea07e5a3e7a5fd76b0eb71909ca87ad830cf1be8.tar.xz
bash-completion: use a PE instead of sed
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r--bash-completion3
1 files changed, 2 insertions, 1 deletions
diff --git a/bash-completion b/bash-completion
index 9ede30f..8caff93 100644
--- a/bash-completion
+++ b/bash-completion
@@ -33,7 +33,8 @@ _mkinitcpio() {
-c|-g) _filedir;;
-k) _find_kernel_versions;;
-b) COMPREPLY=($(compgen -d "$cur" -- $cur));;
- -p) COMPREPLY=($(cd /etc/mkinitcpio.d/ && compgen -X '!*.preset' -f -- $cur|sed 's/\.preset//'));;
+ -p) COMPREPLY=($(cd /etc/mkinitcpio.d/ && compgen -X '!*.preset' -f -- $cur))
+ COMPREPLY=("${COMPREPLY[@]%.preset}");;
-H|-S) COMPREPLY=($(cd /lib/initcpio/install/ && compgen -f -- $cur));;
*) COMPREPLY=($(compgen -W "${action}" -- "$cur"));;
esac