bin/spell: build wordlist with proper newlines

This commit is contained in:
Henrik Lissner 2017-05-03 22:33:35 +02:00
parent 8bfa09f3c7
commit 7d299bda9c

View file

@ -12,7 +12,7 @@ result=$(echo "$@" | aspell -a | tail -n-2)
if [[ "$result" == '*' ]]; then
echo "$@"
else
words=$(echo "$result" | sed 's/[:,] /\n/g' | tail -n +2)
words=$(echo "$result" | sed $'s/[:,] /\\\n/g' | tail -n +2)
if (( $(wc -l <<< "$words") > 1 )) && command -v 'fzf' >/dev/null; then
fzf <<< "$words"
else