Skip to content

Instantly share code, notes, and snippets.

@peterfpeterson
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterfpeterson/638490530e37c3d8dba5 to your computer and use it in GitHub Desktop.
Save peterfpeterson/638490530e37c3d8dba5 to your computer and use it in GitHub Desktop.
# This script is based on one from
# https://forums.dropbox.com/topic.php?id=9644
_dropbox()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="status help puburl stop running start filestatus ls autostart exclude lansync"
case "$prev" in
puburl|filestatus|ls)
_filedir
;;
${COMP_WORDS[0]})
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
;;
*)
COMPREPLY=()
;;
esac
return 0
}
complete -o filenames -F _dropbox dropbox.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment