zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Cc: doron.behar@gmail.com
Subject: Re: [PATCH 1/1] Add completion for zathura.
Date: Tue, 12 Jun 2018 14:46:08 +0200	[thread overview]
Message-ID: <26689.1528807568@thecus> (raw)
In-Reply-To: <20180609173519.q2qra4cv66u65uon@NUC.doronbehar.com>

On 9 Jun, Doron Behar wrote:
> I tried to get some clues as for this subject by digging into zathura's
> source code (https://git.pwmt.org/pwmt/zathura). Could you please tell
> me what are the files the `zathura` package (or what ever it's called)
> provided under your distribution? If there are no `.so` files for at
> least a PDF plugin, I'll put a fall-back here.

The file list is here:
https://koji.fedoraproject.org/koji/rpminfo?rpmID=4869616
That's a zathura 0.2.7 build for RHEL 7 which is perhaps somewhat old.

I would strongly suggest putting a fallback in for at least *.pdf.
You never know when some overly clever logic is going to fail.

> That's smart but it doesn't work. Yet, after reading a little bit the
> documentation I've used this instead:
>
> 	_files -g "*.{${(j.,.)supported_filetypes}}(-.)"

I'd suggest sticking to pattern characters like (...|...) over brace
expansion in the parameter to _files -g. If braces are working, it is by
accident rather than design.

> > applicable here. You probably want either _command_names -e or
> > _cmdstring.
>
> I think I'll use `_cmdstring` since it doesn't complete aliases of
> functions which probably wouldn't be interpreted properly by zathura.

_cmdstring handled a quoted command-line where you might have arguments
to the command. Judging from the example in the documentation, that is
appropriate in this case.

Oliver


  reply	other threads:[~2018-06-12 12:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 15:53 [PATCH 0/1] *** Add completion for zathura *** doron.behar
2018-06-08 15:53 ` [PATCH 1/1] Add completion for zathura doron.behar
2018-06-08 16:28   ` Oliver Kiddle
2018-06-09 17:35     ` Doron Behar
2018-06-12 12:46       ` Oliver Kiddle [this message]
2018-06-08 16:36   ` Daniel Shahaf
2018-06-08 17:01     ` Bart Schaefer
2018-06-09 17:03       ` Doron Behar

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=26689.1528807568@thecus \
    --to=okiddle@yahoo.co.uk \
    --cc=doron.behar@gmail.com \
    --cc=zsh-workers@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).