abook, kldunload: Pre-expand \t instead of relying on sed supporting it.
parent
705be00502
commit
24f0c58c29
|
@ -23,12 +23,12 @@ _abook()
|
|||
case $prev in
|
||||
--informat)
|
||||
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
|
||||
;;
|
||||
--outformat)
|
||||
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
|
||||
;;
|
||||
--infile)
|
||||
|
|
|
@ -8,7 +8,7 @@ _kldunload()
|
|||
_init_completion || return
|
||||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue