This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spell() { | |
# /me futilely avoids googling words to find their correct spelling | |
local candidates oldifs word array_pos | |
oldifs="$IFS" | |
IFS=':' | |
# Parse the apsell format and return a list of ":" separated words | |
read -a candidates <<< "$(printf "%s\n" "$1" \ | |
| aspell -a \ | |
| awk -F':' '/^&/ { |