guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#37364] [PATCH 1/1] gnu: Add z for zsh


From: Collin J. Doering
Subject: [bug#37364] [PATCH 1/1] gnu: Add z for zsh
Date: Wed, 11 Sep 2019 23:13:02 -0400
User-agent: mu4e 1.0; emacs 26.3

Hi Ludovic,

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

> Hello Collin,
>
> "Collin J. Doering" <address@hidden> skribis:
>
>> * gnu/packages/shellutils.scm (z): New variable.
>>
>> Signed-off-by: Collin J. Doering <address@hidden>
>
> [...]
>
>> +(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.

Attachment: signature.asc
Description: PGP signature

Attachment: 0001-gnu-Add-sh-z-shell-tool.patch
Description: 0001-gnu-Add-sh-z-shell-tool.patch

-- 
Collin J. Doering

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]