GNU bug report logs - #51791
[PATCH 0/2]: Update guile-bash

Previous Next

Package: guix-patches;

Reported by: david larsson <david.larsson <at> selfhosted.xyz>

Date: Fri, 12 Nov 2021 13:57:02 UTC

Severity: normal

Tags: patch

Done: david larsson <david.larsson <at> selfhosted.xyz>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: david larsson <david.larsson <at> selfhosted.xyz>
To: 51791 <at> debbugs.gnu.org
Cc: Guix-patches <guix-patches-bounces+david.larsson=selfhosted.xyz <at> gnu.org>
Subject: [bug#51791] [PATCH 0/2]: Update guile-bash
Date: Wed, 15 Dec 2021 12:54:53 +0100
If anyone wants to install a guile-bash that can read arguments with 
whitespace, and newlines, you can install it like this:

wget -O /tmp/patch.temp http://paste.debian.net/plain/1223545 ; guix 
package --with-patch=guile-bash=/tmp/patch.temp -i guile-bash


Then prepare it like this for example:

------------------------------------------
$ export GUILE_AUTO_COMPILE=0
$ enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
$ cat <<'EOF'>/tmp/printargs.scm
(use-modules
 (gnu bash))
(define-bash-function (printargs file1 file2)
    (display file1)
    (display "\n")
    (display file2)
    (display "\n"))
EOF
$ scm /tmp/printargs.scm
-------------------------

And then use the guile function from bash like this:

-------------------------
~$ printargs "apa bepa" cepa
apa bepa
cepa
~$ echo "$apa"
aba
aca
~$ printf '%s\0' "$apa" bepa | printargs -z
aba
aca
bepa
~$ echo "$apa" | printargs
aba
aca
-------------------------


Closing this bug now.




This bug report was last modified 3 years and 161 days ago.

Previous Next


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