zsh-users
 help / color / mirror / code / Atom feed
From: dana <dana@dana.is>
To: Dave Woodfall <dave@tty1.uk>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: rxvt completion
Date: Mon, 4 Nov 2019 21:54:05 -0600	[thread overview]
Message-ID: <A017DC0C-B134-4E7F-ABD0-6C26A4C59254@dana.is> (raw)
In-Reply-To: <20191105031809.GD28517@blackswan>

On 4 Nov 2019, at 21:18, Dave Woodfall <dave@tty1.uk> wrote:
> There are some options that are the same, but urxvt has many more.

It looks like almost a super-set, so you could just do something like:

  args=( ... ) # Common arg specs

  # Detect urxvt by looking for 'unicode' in the -help output, or whatever
  # would actually work here, idk
  if _pick_variant urxvt=unicode rxvt -help; then
    args+=( ... ) # urxvt-specific arg specs
  else
    args+=( ... ) # rxvt-specific arg specs
  fi

  _x_arguments $args

The existing call to urxvt for the long_args thing probably (?) needs changed
too, so that it uses $words[1] (the actual command being completed for)
together with _call_program — lots of examples of that in the repo too

dana


      reply	other threads:[~2019-11-05  3:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 22:09 Dave Woodfall
2019-11-05  3:04 ` dana
2019-11-05  3:18   ` Dave Woodfall
2019-11-05  3:54     ` dana [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A017DC0C-B134-4E7F-ABD0-6C26A4C59254@dana.is \
    --to=dana@dana.is \
    --cc=dave@tty1.uk \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).