all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "(" <paren@disroot.org>
To: "Csepp" <raingloom@riseup.net>
Cc: "jgart" <jgart@dismail.de>, "Ricardo Wurmus" <rekado@elephly.net>,
	<help-guix@gnu.org>
Subject: Re: Am I doing it all wrong?
Date: Sun, 28 Aug 2022 13:21:22 +0100	[thread overview]
Message-ID: <CMHNOTY0PL3F.3962RLA2PZT4K@guix-aspire> (raw)
In-Reply-To: <87y1v8r3ev.fsf@riseup.net>

On Sun Aug 28, 2022 at 12:50 PM BST, Csepp wrote:
> Did you test that one?  Because I'm pretty sure it won't work, you
> aren't passing the heredoc file descriptor to sh but guix shell.

I hadn't tested it then, but I just did now, and it works.

  gsh -D guix lua <<EOF
  echo "hello"
  lua -e 'print "hello"'
  guile -c '(display "hello") (newline)'
  EOF
  hello
  hello
  hello

> Also, that should probably be "$@", just in case.

I don't think it'll make any difference; if, say, "foo" "bar" "baz" is
passed, both $@ and "$@" will expand to "foo" "bar" "baz" (yes, bypassing
the quotes).

According to POSIX.1-2017's specification of `sh`:

  When the expansion occurs within double-quotes, the behavior is unspecified
  unless one of the following is true:

  + Field splitting [...] would be performed if the expansion were not within
    double-quotes [...].

  + [...]

So, $@ == "$@".

> Because Bash is garbage. :)

I can't disagree on that one. :)

    -- (


  reply	other threads:[~2022-08-28 12:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-27 15:34 Am I doing it all wrong? jgart
2022-08-27 17:15 ` Ricardo Wurmus
2022-08-27 18:38   ` jgart
2022-08-27 20:53     ` (
2022-08-27 20:56     ` (
2022-08-27 20:58       ` (
2022-08-28 11:50         ` Csepp
2022-08-28 12:21           ` ( [this message]
2022-08-28 14:10             ` Saku Laesvuori
2022-08-27 20:45 ` (
2022-08-28 11:52 ` Csepp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CMHNOTY0PL3F.3962RLA2PZT4K@guix-aspire \
    --to=paren@disroot.org \
    --cc=help-guix@gnu.org \
    --cc=jgart@dismail.de \
    --cc=raingloom@riseup.net \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.