diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2014-08-11 17:39:42 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2014-08-11 17:39:42 +0200 |
commit | 382c26acfc62a56744ab9eb603efc56130764fd3 (patch) | |
tree | 1b7cb9d3e372481007fc4546e7d06ce5bb1bc104 /Completion/Unix/Command/_bpython | |
parent | 73508e345b4925f33b7f652aba9bd313169e5ac2 (diff) | |
parent | f8ae47f29b766dc0330b19d7fdb35859d6aab930 (diff) | |
download | zsh-382c26acfc62a56744ab9eb603efc56130764fd3.tar.gz zsh-382c26acfc62a56744ab9eb603efc56130764fd3.zip |
New upstream release candidate: Merge branch 'upstream' into debian
Diffstat (limited to 'Completion/Unix/Command/_bpython')
-rw-r--r-- | Completion/Unix/Command/_bpython | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_bpython b/Completion/Unix/Command/_bpython new file mode 100644 index 000000000..c51cc8c3c --- /dev/null +++ b/Completion/Unix/Command/_bpython @@ -0,0 +1,46 @@ +#compdef bpython bpython-gtk bpython-urwid bpython2 bpython2-gtk bpython2-urwid bpython3 bpython3-gtk bpython3-urwid + +local -a all_opts urwid_opts gtk_opts + +all_opts=( + '--config[configuration file]:config file:_files' + '-h --help[show help message]' + '(-i --interactive)'{-i,--interactive}'[drop to bpython after running a file]' + '(-q --quiet)'{-q,--quiet}'[do not flush the output to stdout]' + '(-V --version)'{-V,--version}'[print version]' + '1:script:_files -g "*.u#py(-.)"' + '*:arguments:' +) + +urwid_opts=( + '(-r --reactor)'{-r,--reactor}'[use Twisted reactor instead of the event loop]:reactor:' + '--help-reactors[display list of available Twisted reactors]' + '(-p --plugin)'{-p,--plugin}'[exectue a twistd plugin]:plugin:' + '(-s --server)'{-s,--server}'[run an eval server on the given port]:port:' +) + +gtk_opts=( + '--socket-id[embed bpython]:socket id:' +) + +case "$service" in + bpython|bpython2|bpython3) + _arguments \ + "$all_opts[@]" && return 0 + ;; + + bpython-urwid|bpython2-urwid|bpython3-urwid) + _arguments \ + "$all_opts[@]" \ + "$urwid_opts[@]" && return 0 + ;; + + bpython-gtk|bpython2-gtk|bpython3-gtk) + _arguments \ + "$all_opts[@]" \ + "$gtk_opts[@]" && return 0 + ;; +esac + + +# vim:autoindent expandtab shiftwidth=2 tabstop=2 softtabstop=2 filetype=zsh |