diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2014-07-26 14:58:49 -0700 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2014-07-26 14:58:49 -0700 |
commit | 0f20ffdd1562b438ad822136fbaee23cebc9f1c3 (patch) | |
tree | 5b23df76acc4b90316578bf20715b1bcb1c35e8c /Completion/Unix/Command/_bpython | |
parent | e439bd105b9a15e18c57dc0208205c467a67e685 (diff) | |
parent | 05ce4f2a0b7a4ecbf5f893efcfd94fb627a71861 (diff) | |
download | zsh-0f20ffdd1562b438ad822136fbaee23cebc9f1c3.tar.gz zsh-0f20ffdd1562b438ad822136fbaee23cebc9f1c3.tar.xz zsh-0f20ffdd1562b438ad822136fbaee23cebc9f1c3.zip |
Merge branch 'master' of git://git.code.sf.net/p/zsh/code
Conflicts: ChangeLog
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 |