Open mturilin opened 1 year ago
As discussed in the chat, a single $
option could be much nicer:
{
for container in containers {
$ ./launch_container.sh ${container}
}
}
Having some reservations (it would already be implemented otherwise). Thinking here:
This is line oriented syntax: from $
and until end of line. Not particularly fond of it. Can't have multiple commands on the same line while you can have other syntax elements separated by ;
on the same line. $ ...; ...
would look weird.
$ ...
is kind of counterpart of $(...)
. Since there is %(...)
syntax (for defining a command without running it), one might expect % ...
syntax as well, which I was not thinking implementing.
Still thinking about syntax and not finding anything that would be "oh, that's right!".
Any ideas on that front @mturilin ?
I was also looking at xonsh and they have nice syntax for "uncaptured subprocess": https://xon.sh/tutorial.html#uncaptured-subprocess-with-and
My previous example would look like this:
{
for container in containers {
$[./launch_container.sh ${container}]
}
}
Sounds like a candidate. Need to think a bit about how it fits with the rest.
In dev
branch now
Note: This is a minor nitpick for otherwise an amazing system.
Role: As a developer, I want to use NGS to create scripts that stitch together external commands, like in shell scripts.
Problem:
$(top_level::
looks less intuitive than plan bash.Example 1: NGS
You can see that
$(top_level::
visually distracts from the command itself.Bash:
I think this syntax looks much cleaner.