Last active
December 23, 2019 20:05
-
-
Save classmember/2c90347b67105a805c3f55478d00980a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
suggest() { | |
echo "$(/Users/kolby/Code/suggest/google_suggestions.py $*)" | |
} | |
search() { | |
echo "$(/Users/kolby/Code/suggest/search.py $*)" | |
} | |
search_suggestions() { | |
if [ "${#COMP_WORDS[@]}" == "1" ]; then | |
return | |
fi | |
COMPREPLY=($(compgen -W "$(suggest $*)" -- "${COMP_WORDS[1]}")) | |
} | |
complete -F search_suggestions search |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment