guix-patches
[Top][All Lists]
Advanced

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

[bug#41539] [PATCH 1/2] size: Document that positional arguments can be


From: zimoun
Subject: [bug#41539] [PATCH 1/2] size: Document that positional arguments can be store items.
Date: Fri, 29 May 2020 11:56:30 +0200

Dear,

On Fri, 29 May 2020 at 11:26, Pierre Neidhardt <mail@ambrevar.xyz> wrote:

> >> +@example
> >> +guix size $(guix system build config.scm)
> >
> > Please use backquotes instead of $(…), which is Bash-specific.
>
> Actually, it's not, $(...) is POSIX (you can test with Dash).
> Backquotes are deprecated and have the downside of not nesting.

Yes, $(...) is POSIX, AFAIK.
And let quote what POSIX says: "Because of these inconsistent
behaviors, the backquoted variety of command substitution is not
recommended for new applications that nest command substitutions or
attempt to embed complex scripts."

https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_06_03

(I do not know if it is the latest version of the document.)


Well, $(...) is already used in the manual.  For example, X11 fonts
section because of nested.  But elsewhere not, see e.g., invoking guix
archive or Nteworking Services or Invoking guix system sections.

https://guix.gnu.org/manual/devel/en/guix.html#X11-Fonts
https://guix.gnu.org/manual/devel/en/guix.html#Invoking-guix-archive
https://guix.gnu.org/manual/devel/en/guix.html#Networking-Services
https://guix.gnu.org/manual/devel/en/guix.html#Invoking-guix-system

Therefore, only one should be used.  And $(...) is better.  So I would
be in favour to replace all the backquotes by $(...) in the manual.


All the best,
simon





reply via email to

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