bash_completion: fix dahdi_genconf

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This commit is contained in:
Tzafrir Cohen 2014-01-23 23:16:55 +02:00
parent b8d1e467e4
commit 63842cc4f3

View File

@ -90,9 +90,9 @@ __dahdi_genconf() {
--line-type) COMPREPLY=( $(compgen -W 'E1 J1 T1' -- $cur) ) ;; --line-type) COMPREPLY=( $(compgen -W 'E1 J1 T1' -- $cur) ) ;;
*) *)
case "$cur" in case "$cur" in
-*) COMPREPLY=( ${COMPREPLY[@]} $(compgen -W '-F -v -V --freepbx --version --verbose --line-type' -- $cur ) ) ;; -*) COMPREPLY+=( $(compgen -W '-F -v -V --freepbx --version --verbose --line-type' -- $cur ) ) ;;
*) *)
COMPREPLY=( $( perl -e 'my $file = "\u$ARGV[0]"; COMPREPLY+=( $(compgen -W "$( perl -e 'my $file = "\u$ARGV[0]";
# Complete module name. Translate the case of the # Complete module name. Translate the case of the
# first letter # first letter
my @pats = map {"$_/Dahdi/Config/Gen/$file*.pm"} @INC; my @pats = map {"$_/Dahdi/Config/Gen/$file*.pm"} @INC;
@ -101,9 +101,9 @@ __dahdi_genconf() {
s|.*/||; s|.*/||;
s|.pm$||; s|.pm$||;
s|^(.)|lc($1)|e; s|^(.)|lc($1)|e;
print "$_\n" print "$_ "
} }
}') ) }')" -- $cur ) )
;; ;;
esac esac
;; ;;