From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59699) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8FYZ-0006Au-Gs for guix-patches@gnu.org; Wed, 11 Sep 2019 23:14:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i8FYY-0005Cp-30 for guix-patches@gnu.org; Wed, 11 Sep 2019 23:14:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34102) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i8FYX-0005BS-UP for guix-patches@gnu.org; Wed, 11 Sep 2019 23:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i8FYX-00053u-NA for guix-patches@gnu.org; Wed, 11 Sep 2019 23:14:01 -0400 Subject: [bug#37364] [PATCH 1/1] gnu: Add z for zsh Resent-Message-ID: References: <87woeg3mcy.fsf@rekahsoft.ca> <87v9u03m3m.fsf@rekahsoft.ca> <87d0g7vx6y.fsf@gnu.org> From: "Collin J. Doering" In-reply-to: <87d0g7vx6y.fsf@gnu.org> Date: Wed, 11 Sep 2019 23:13:02 -0400 Message-ID: <87lfuu2on5.fsf@rekahsoft.ca> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 37364@debbugs.gnu.org --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludovic, On 11 Sep 2019 at 08:23, Ludovic Court=C3=A8s wrote: > Hello Collin, > > "Collin J. Doering" skribis: > >> * gnu/packages/shellutils.scm (z): New variable. >> >> Signed-off-by: Collin J. Doering > > [...] > >> +(define-public z >> + (package >> + (name "z") > > So far there=E2=80=99s only one package with a one-letter name. I=E2=80= =99d be tempted > to rename =E2=80=9Cz=E2=80=9D to =E2=80=9Csh-z=E2=80=9D (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 =E2=80=9Cgzip=E2=80=9D invocation because the =E2=80=98c= ompress-documentation=E2=80=99 > phase takes care of that, and passes the =E2=80=98-n=E2=80=99 flag, which= is important > for bitwise reproducibility. Makes sense, we wouldn't want timestamps. My mistake. > > Also, you can remove the =E2=80=98mkdir-p=E2=80=99 call and replace the = =E2=80=98copy-file=E2=80=99 call > with: > > (install-file "z.1" man) > > Last: please remove =E2=80=98-path=E2=80=99 from variable names=E2=80=94i= n GNU the convention is > touse the term =E2=80=9Cpath=E2=80=9D 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 s= hort >> +learning phase, z will take you to the most frecent directory that matc= hes >> +ALL of the regexes given on the command line in order.") > > It=E2=80=99s suggest writing =E2=80=9C``frecency''=E2=80=9D (with quotes)= to make it clear that > it=E2=80=99s not a typo. :-) Agree. > > Could you send an updated patch? > > Thanks, > Ludo=E2=80=99. You will find an updated patch as part of this email with the above changes. Kind regards, and thanks for the helpful feedback. --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE+NVG868371PRtki+e03rkyErMCIFAl15t78ACgkQe03rkyEr MCKNkQf/THbkO1memh7C1gQAcgkP69I/0KlgjRLtxz4YDk36q80cE6VQS71LbjUj qVYHYNpyt/3LxP2WPzjItIYCFxBwhyL1cnq1OPvc+acr3DjxJblW3Ft/LRznMRgU lQun0jS5S0HqXTSsics6mHiVYGpogcGqVvSUfX6MXSGa71IXvzO91wNDRSG5HnL7 zDhAu5ox9+Hz/FGrkakTLV+3CHrvIjR1fAjnMQifzz3CRmZioc7YAsl8Oe/77Fcf ZYF7V8yC/nOCtavyUKfqNlTaGhTfN8UVfZiPwMFNmrRneUoAVCzb5I6Y8DnGY9J6 MP9rHkxwM6z7fzJ/iVborbYypLqckQ== =yHUL -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-sh-z-shell-tool.patch Content-Transfer-Encoding: quoted-printable Content-Description: 0001-gnu-Add-sh-z-shell-tool.patch >From f5fd56da740cd2576def4c01c3cc7003f1c9f2d7 Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Wed, 11 Sep 2019 23:08:37 -0400 Subject: [PATCH] gnu: Add sh-z shell tool * gnu/packages/shellutils.scm (sh-z): New variable. Signed-off-by: Collin J. Doering --- gnu/packages/shellutils.scm | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index f7542ea759..bbdfd0dadd 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -5,6 +5,7 @@ ;;; Copyright =C2=A9 2017 Stefan Reich=C3=B6r ;;; Copyright =C2=A9 2018 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2018 Benjamin Slade +;;; Copyright =C2=A9 2019 Collin J. Doering ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,11 +34,48 @@ #:use-module (gnu packages ncurses) #:use-module (gnu packages readline) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages compression) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system python)) =20 +(define-public sh-z + (package + (name "sh-z") + (version "1.11") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rupa/z.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "13zbgkj6y0qhvn5jpkrqbd4jjxjr789k228iwma5hjfh1nx7ghyb")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; No tests provided + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (man (string-append out "/share/man/man1")) + (bin (string-append out "/bin"))) + (install-file "z.sh" bin) + (chmod (string-append bin "/z.sh") #o755) + (install-file "z.1" man))))))) + (synopsis "Jump about directories") + (description + "Tracks your most used directories, based on ``frecency''. After a s= hort +learning phase, z will take you to the most ``frecent'' directory that mat= ches +ALL of the regexes given on the command line in order.") + (home-page "https://github.com/rupa/z") + (license license:expat))) + (define-public envstore (package (name "envstore") --=20 2.23.0 --=-=-= Content-Type: text/plain -- Collin J. Doering http://rekahsoft.ca http://blog.rekahsoft.ca http://git.rekahsoft.ca --=-=-=--