Created
March 21, 2018 13:04
-
-
Save veloper/3b75b5b9d64a386256de866e70d9a4cf 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
#compdef thor | |
#autoload | |
TIME=`expr $(date +%s) / 60` | |
TMP_FILE=`echo "/tmp/thor_cached_comps.$TIME.txt"` | |
if [ -e $TMP_FILE ]; then | |
# do nothing | |
else | |
CMDS=`thor list | grep thor | cut -d " " -f 2` | |
echo $CMDS > $TMP_FILE; | |
fi | |
compadd `cat $TMP_FILE` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment