From: Oliver Freyermuth <o.freyermuth@googlemail.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: zsh-workers@zsh.org
Subject: Re: zathura conpletion for zsh broken
Date: Wed, 26 Sep 2018 04:22:37 +0200 [thread overview]
Message-ID: <5e25b789-3613-6b63-d688-767857395098@googlemail.com> (raw)
In-Reply-To: <1537916165.201389.1520635144.15A3171F@webmail.messagingengine.com>
Am 26.09.18 um 00:56 schrieb Daniel Shahaf:
> Oliver Freyermuth wrote on Tue, 25 Sep 2018 23:22 +0200:
>> Thanks! Didn't know this is copied as-is, I'll take better care in the
>> future. Hopefully the commit message of the attached patch is better.
>
> Yes, it is, thank you.
>
> Not all developers copy the message as-is. I happen to use git-am(1)
> to apply patches so it's easier for me to consume patches produced
> by git-send-email(1) or git-format-patch(1), like yours. Other developers
> use other tools and don't care so much about the format so long as it
> can be piped to patch(1) or git-apply(1).
>
> [ Actually, I use a wrapper around git-am(1) that also automatically
> adds the mailing list message number to the log message and creates
> a ChangeLog entry. You might find it an interesting read:
> https://github.com/danielshahaf/zsh-dev/ ]
[ That's indeed a good read, many thanks for the link! ]
>> The attached patch fixes the second issue, I tested with a dummy .so
>> in /usr/local/lib/zathura. Plugin file formats are now also made
>> unique. Let me know if this can be simplified, or if it is in any case
>> unneeded since the "uniqueness" is implicit in the matching code later
>> on - I'm still learning more and more about the wonders of zsh
>> expansion, and every bit I learn leaves me wondering how I could ever
>> survive without that knowledge up to now.
>>
>
> I've changed:
> .
> + plugins_files+=( $plugins_dir/*.so )
> .
> to:
> .
> + plugins_files+=( $plugins_dir/*.so(N) )
> .
> to avoid an error if one of the directories exists and contains no *.so
> files. This was a preëxisting bug in the function (it means the '((
> $#plugin_files ))' check was redundant).
Good point!
> Regarding uniqueness, another way to achieve uniqueness is to pass -U to
> the 'typedef -a' command that declares the variable.
That's indeed more beautiful in most cases, and noted down for the future.
I hope I can make good use of that with a future contribution which will surely come
latest when I start to use a tool for which the completion is lacking or even missing.
Many thanks for the helpful advice!
Cheers,
Oliver
>
> Also, it's not idiomatic to use [[ -z $array ]], though it will function correctly.
>
>> Cheers,
>> Oliver
>>
>>> P.S. Our of curiosity, what's that U+0261 LATIN SMALL LETTER SCRIPT G doing there?
>> Spotted very well, my font and mail client hid that from me. I did
>> accidentally hit the keybinding for SCIM (Smart Common Input
>> Method) while typing, and it started to interfere. That created
>> some funny characters, and apparently I missed to remove the "g"
>> once I noticed it.
>
> OK :)
>
> Cheers,
>
> Daniel
>
next prev parent reply other threads:[~2018-09-26 2:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-25 15:14 Oliver Freyermuth
2018-09-25 19:21 ` Daniel Shahaf
2018-09-25 20:02 ` Oliver Freyermuth
2018-09-25 20:36 ` Daniel Shahaf
2018-09-25 21:22 ` Oliver Freyermuth
2018-09-25 22:56 ` Daniel Shahaf
2018-09-26 2:22 ` Oliver Freyermuth [this message]
2018-09-26 21:08 ` Leah Neukirchen
2018-09-27 18:20 ` Daniel Shahaf
2018-09-27 18:31 ` Bart Schaefer
2018-09-27 19:16 ` Daniel Shahaf
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=5e25b789-3613-6b63-d688-767857395098@googlemail.com \
--to=o.freyermuth@googlemail.com \
--cc=d.s@daniel.shahaf.name \
--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).