Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __cltwitter_complete () {
- local cache="$HOME/.cltwitter_users.cache"
- local string=${COMP_WORDS[COMP_CWORD]}
- local last_word=${string##* }
- local prefix=${string% *}
- COMPREPLY=()
- #if [ ! -f ${cache} ] || [ "`find ${cache} -mmin +60`" != "" ]; then
- # cltwitter-update-cache
- #fi
- if [[ "$last_word" == "@* ]]; then # if word is beginning of a quotation
- last_word=${last_word:2}
- elif [[ "$last_word" == @* ]]; then # if user put '@' in front
- last_word=${last_word:1}
- fi
- COMPREPLY=( $( compgen -W "`cat $cache`" -P @ -- $last_word ) )
- }
- complete -F __cltwitter_complete tweet
- tweet Foo bar @s<TAB>
Add Comment
Please, Sign In to add comment