GNU bug report logs -
#74180
[PATCH] gnu: add bash-preexec
Previous Next
To reply to this bug, email your comments to 74180 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#74180
; Package
guix-patches
.
(Sat, 02 Nov 2024 21:15:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Javier Olaechea <pirata <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 02 Nov 2024 21:15:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Attached is a patch to package bash-preexec. It provides hooks that other
programs can use to to register commands to run when one runs a command on
the shell w/o clobbering each other. For example it allows me to use both
direnv and atuin. ej.
(home-environment
(services
(list (service home-bash-service-type
(home-bash-configuration
(bashrc (list (mixed-text-file "source-bash-preexec"
"source " bash-preexec
"/bin/bash-preexec.sh")
(mixed-text-file "eval-direnv"
"eval \"$(" direnv
"/bin/direnv hook bash)\"")
(mixed-text-file
"eval-atuin"
"eval \"$(" atuin-bin "/bin/atuin init
bash --disable-up-arrow)\""))))))))
Cheers
--
"I object to doing things that computers can do." — Olin Shivers
[Message part 2 (text/html, inline)]
[0001-gnu-add-bash-preexec.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#74180
; Package
guix-patches
.
(Sun, 03 Nov 2024 20:08:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 74180 <at> debbugs.gnu.org (full text, mbox):
On 2024-11-02 21:14, Javier Olaechea wrote:
> * gnu/packages/bash.scm: (bash-preexec): New variable.
> +
> +(define-public bash-preexec
> + (package
> + (name "bash-preexec")
> + (version "0.5.0")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/rcaloras/bash-preexec")
> + (commit "da64ad4b7bb965d19dbeb5bb7447f1a63e3de2e3")))
You can use version here.
> +
> + (sha256
> + (base32 "0nx0m1bhm4f4v033ngi2m9zq3vppimsmn8kmwqbvyqr4n6gkjmgq"))))
> + (build-system gnu-build-system)
Looks like you can simply use the copy-build-system here, no?
> + (arguments
> + (list
> + #:phases #~(modify-phases %standard-phases
> + (delete 'configure)
> + (delete 'build)
> + (delete 'check)
> + (replace 'install
> + (lambda _
> + (install-file "bash-preexec.sh"
> + (string-append #$output "/bin")))))))
> + (home-page "https://github.com/rcaloras/bash-preexec")
> + (synopsis "preexec and precmd functions for Bash just like Zsh")
> + (description
> + "preexec and precmd hook functions for Bash 3.1+ in the style of
> Zsh.")
The description should be more descriptive. You can describe the two
functions like they do in the README. Use @command{bash/zsh}. Prefix
with "This package provides".
> + (license license:expat)))
>
> base-commit: ea11d3608566174c4bae70faa4f9d0c67748d2db
--
Best regards,
Nicolas Graves
Information forwarded
to
guix-patches <at> gnu.org
:
bug#74180
; Package
guix-patches
.
(Mon, 04 Nov 2024 04:30:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 74180 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> > +
> > + (sha256
> > + (base32
> "0nx0m1bhm4f4v033ngi2m9zq3vppimsmn8kmwqbvyqr4n6gkjmgq"))))
> > + (build-system gnu-build-system)
>
> Looks like you can simply use the copy-build-system here, no?
>
Good call, I've updated the the package to do so. One thing I changed as
well is the location for bash-preexec.sh. I saw arch (
https://gitlab.archlinux.org/archlinux/packaging/packages/bash-preexec/-/blob/main/PKGBUILD?ref_type=heads#L30)
and nix package it under share/ instance of bin/.
Another thing I did was filtering the test files from the package. As they
require the bats package to run.
> > + (description
> > + "preexec and precmd hook functions for Bash 3.1+ in the style of
> > Zsh.")
>
> The description should be more descriptive. You can describe the two
> functions like they do in the README. Use @command{bash/zsh}. Prefix
> with "This package provides".
>
Updated accordingly. Let me know if there are any other improvements
--
"I object to doing things that computers can do." — Olin Shivers
[Message part 2 (text/html, inline)]
[v2-0001-gnu-add-bash-preexec.patch (text/x-patch, attachment)]
This bug report was last modified 278 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.