abook, kldunload: Pre-expand \t instead of relying on sed supporting it.

This commit is contained in:
Ville Skyttä 2013-08-26 23:20:30 +03:00
parent 705be00502
commit 24f0c58c29
2 changed files with 3 additions and 3 deletions

View File

@ -23,12 +23,12 @@ _abook()
case $prev in case $prev in
--informat) --informat)
COMPREPLY=( $( compgen -W "$(abook --formats | \ COMPREPLY=( $( compgen -W "$(abook --formats | \
sed -n -e 's/^\t\([a-z]*\).*/\1/p' -e '/^$/q')" -- "$cur" ) ) sed -n -e 's/^'$'\t''\([a-z]*\).*/\1/p' -e '/^$/q')" -- "$cur" ) )
return 0 return 0
;; ;;
--outformat) --outformat)
COMPREPLY=( $( compgen -W "$(abook --formats | \ COMPREPLY=( $( compgen -W "$(abook --formats | \
sed -n -e '/^$/,$s/^\t\([a-z]*\).*/\1/p')" -- "$cur" ) ) sed -n -e '/^$/,$s/^'$'\t''\([a-z]*\).*/\1/p')" -- "$cur" ) )
return 0 return 0
;; ;;
--infile) --infile)

View File

@ -8,7 +8,7 @@ _kldunload()
_init_completion || return _init_completion || return
COMPREPLY=( $( kldstat | \ COMPREPLY=( $( kldstat | \
sed -ne "s/^.*[ \t]\{1,\}\($cur[a-z_]\{1,\}\).ko$/\1/p" ) ) sed -ne "s/^.*[ $'\t']\{1,\}\($cur[a-z_]\{1,\}\).ko$/\1/p" ) )
} && } &&
complete -F _kldunload kldunload complete -F _kldunload kldunload