abook, kldunload: Pre-expand \t instead of relying on sed supporting it.
This commit is contained in:
parent
705be00502
commit
24f0c58c29
@ -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)
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user