GNU bug report logs - #37364
[PATCH 0/1] Add z for zsh

Previous Next

Package: guix-patches;

Reported by: "Collin J. Doering" <collin <at> rekahsoft.ca>

Date: Tue, 10 Sep 2019 02:41:01 UTC

Severity: normal

Tags: fixed, patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 37364 <at> debbugs.gnu.org (full text, mbox):

From: "Collin J. Doering" <collin <at> rekahsoft.ca>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 37364 <at> debbugs.gnu.org, "Collin J. Doering" <collin <at> rekahsoft.ca>
Subject: Re: [bug#37364] [PATCH 1/1] gnu: Add z for zsh
Date: Wed, 11 Sep 2019 23:13:02 -0400
[Message part 1 (text/plain, inline)]
Hi Ludovic,

On 11 Sep 2019 at 08:23, Ludovic Courtès wrote:

> Hello Collin,
>
> "Collin J. Doering" <collin <at> rekahsoft.ca> skribis:
>
>> * gnu/packages/shellutils.scm (z): New variable.
>>
>> Signed-off-by: Collin J. Doering <collin <at> rekahsoft.ca>
>
> [...]
>
>> +(define-public z
>> +  (package
>> +    (name "z")
>
> So far there’s only one package with a one-letter name.  I’d be tempted
> to rename “z” to “sh-z” (because it works with both Zsh and Bash) or
> something similar, WDYT?

I felt uncomfortable with just `z` so I'm happy to change it to `sh-z`.

>
>> +               (mkdir-p man-path)
>> +               (invoke "gzip" "z.1")
>> +               (copy-file "z.1.gz" (string-append man-path "/z.1.gz"))
>
> You can omit the “gzip” invocation because the ‘compress-documentation’
> phase takes care of that, and passes the ‘-n’ flag, which is important
> for bitwise reproducibility.

Makes sense, we wouldn't want timestamps. My mistake.

>
> Also, you can remove the ‘mkdir-p’ call and replace the ‘copy-file’ call
> with:
>
>   (install-file "z.1" man)
>
> Last: please remove ‘-path’ from variable names—in GNU the convention is
> touse the term “path” only for search paths ($PATH, etc.)

Thanks for pointing this out. After going to review some uses of the
`install-file` function, I see this is certainly the case.

>
>> +    (synopsis "Jump about directories")
>> +    (description
>> +     "Tracks your most used directories, based on freecency.  After a short
>> +learning phase, z will take you to the most frecent directory that matches
>> +ALL of the regexes given on the command line in order.")
>
> It’s suggest writing “``frecency''” (with quotes) to make it clear that
> it’s not a typo.  :-)

Agree.

>
> Could you send an updated patch?
>
> Thanks,
> Ludo’.

You will find an updated patch as part of this email with the above
changes.

Kind regards, and thanks for the helpful feedback.
[signature.asc (application/pgp-signature, inline)]
[0001-gnu-Add-sh-z-shell-tool.patch (text/x-patch, attachment)]
[Message part 4 (text/plain, inline)]
-- 
Collin J. Doering

http://rekahsoft.ca
http://blog.rekahsoft.ca
http://git.rekahsoft.ca

This bug report was last modified 5 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.