zsh-workers
 help / color / mirror / code / Atom feed
* Fwd: [Pkg-zsh-devel] Bug#691714: zsh: please add completion for bpython [origin: sebastian@ramacher.at]
@ 2014-06-28 12:58 Axel Beckert
  2014-07-26 19:55 ` Axel Beckert
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Beckert @ 2014-06-28 12:58 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

Hi,

attached a new completion for the bpython command. Initially reported
in Debian at https://bugs.debian.org/691714 .

		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@deuxchevaux.org  (Mail)
 X   See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)

[-- Attachment #2: Type: message/rfc822, Size: 9175 bytes --]

[-- Attachment #2.1.1.1.1: Type: text/plain, Size: 1218 bytes --]

Package: zsh
Version: 5.0.0-2
Severity: wishlist
Tags: patch

Please add completion for bpython and its variants. The attached file
implements Completion for bpython, -urwid and -gtk.

Regards

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (650, 'unstable'), (601, 'testing'), (600, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.5-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages zsh depends on:
ii  libc6      2.13-36
ii  libcap2    1:2.22-1.2
ii  libtinfo5  5.9-10

Versions of packages zsh recommends:
ii  libc6         2.13-36
ii  libncursesw5  5.9-10
ii  libpcre3      1:8.31-1

Versions of packages zsh suggests:
ii  zsh-doc  4.3.17-1

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/zsh/functions/Completion/Debian/_dpkg (from zsh package)
debsums: changed file /usr/share/zsh/functions/Completion/Debian/_apt (from zsh package)
debsums: changed file /usr/share/zsh/functions/Completion/Unix/_python (from zsh package)

-- 
Sebastian Ramacher

[-- Attachment #2.1.1.1.2: _bpython --]
[-- Type: text/plain, Size: 1163 bytes --]

#compdef bpython bpython-gtk bpython-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)
    _arguments \
      "$all_opts[@]" && return 0
  ;;

  bpython-urwid)
    _arguments \
      "$all_opts[@]" \
      "$urwid_opts[@]" && return 0
  ;;

  bpython-gtk)
    _arguments \
      "$all_opts[@]" \
      "$gtk_opts[@]" && return 0
  ;;
esac


# vim:autoindent expandtab shiftwidth=2 tabstop=2 softtabstop=2 filetype=zsh

[-- Attachment #2.1.1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2.1.2: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Pkg-zsh-devel mailing list
Pkg-zsh-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-zsh-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fwd: [Pkg-zsh-devel] Bug#691714: zsh: please add completion for bpython [origin: sebastian@ramacher.at]
  2014-06-28 12:58 Fwd: [Pkg-zsh-devel] Bug#691714: zsh: please add completion for bpython [origin: sebastian@ramacher.at] Axel Beckert
@ 2014-07-26 19:55 ` Axel Beckert
  0 siblings, 0 replies; 2+ messages in thread
From: Axel Beckert @ 2014-07-26 19:55 UTC (permalink / raw)
  To: zsh-workers; +Cc: Sebastian Ramacher

Hi,

On Sat, Jun 28, 2014 at 02:58:39PM +0200, Axel Beckert wrote:
> attached a new completion for the bpython command. Initially reported
> in Debian at https://bugs.debian.org/691714 .
[...]
> #compdef bpython bpython-gtk bpython-urwid
[...]
> case "$service" in
>   bpython)
>     _arguments \
>       "$all_opts[@]" && return 0
>   ;;
[...]

JFTR: I'll commit this soon, but will include one small modification:

Instead of just completing for bpython, I'll also let it complete for
bpython2 (python2 version on at least ArchLinux which has python3 as default) and
bpython3 (python3 version on at least Debian which has python2 as default)

		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@deuxchevaux.org  (Mail)
 X   See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-26 20:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-28 12:58 Fwd: [Pkg-zsh-devel] Bug#691714: zsh: please add completion for bpython [origin: sebastian@ramacher.at] Axel Beckert
2014-07-26 19:55 ` Axel Beckert

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).