wtf: Hush stderr when db file doesn't exist.

This commit is contained in:
Ville Skyttä 2013-11-26 19:37:25 +02:00
parent 780d97c5ac
commit f5df66f476

View File

@ -20,7 +20,8 @@ _wtf()
done
[[ -z $db ]] && db=${ACRONYMDB:-/usr/share/misc/acronyms*}
COMPREPLY=( $( compgen -W "$( cut -f 1 -s $db ) -f" -- "${cur^^}" ) )
COMPREPLY=( $( compgen -W "$( cut -f 1 -s $db 2>/dev/null ) -f" \
-- "${cur^^}" ) )
} &&
complete -F _wtf wtf