Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: rxvt completion



On 4 Nov 2019, at 21:18, Dave Woodfall <dave@xxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author