Last active
August 29, 2015 14:02
-
-
Save peterfpeterson/638490530e37c3d8dba5 to your computer and use it in GitHub Desktop.
Bash completion for https://www.getdropbox.com/download?dl=packages/dropbox.py
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
# 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