From ea07e5a3e7a5fd76b0eb71909ca87ad830cf1be8 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 26 Jun 2011 23:08:06 -0400 Subject: bash-completion: use a PE instead of sed Signed-off-by: Dave Reisner --- bash-completion | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-24-g4f1b