The GNU Bourne-Again SHell - Patches: patch #10273, Choose connector for new lines...
You are not allowed to post comments on this tracker with your current authentication level.
patch #10273: Choose connector for new lines instead of ;
Submitter: | Hugues <izissise> | ||
Submitted: | Mon 29 Aug 2022 10:21:49 AM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Wont Do | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Wed 14 Sep 2022 05:04:32 PM UTC, comment #2: |
Hugues <izissise> |
Mon 29 Aug 2022 03:22:17 PM UTC, comment #1: Thanks for the suggestion. I don't think this is generally useful, and the ongoing support issues will outweigh the benefits. I'm not going to apply the patch. |
Chet Ramey <chet> |
Mon 29 Aug 2022 10:21:49 AM UTC, original submission:
Add BASH_CMD_CONNECTOR special variable which set the
|
Hugues <izissise> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2022-08-29 | chet | Status | None | Wont Do | |
2022-08-29 | izissise | Attached File | - | Added 0001-Choose-connector-for-new-lines-instead-of.patch, #53620 |
Powered by Savane 3.13-3230.
Corresponding source code
Hello, I agree that some of these usages aren't useful,
the most interesting one is undoubtedly `BASH_CMD_CONNECTOR='&&'`
It allows writing scripts that stop at the first unhandled error.
The alternative (writing '&& \' at the end of each line) is heavier but also error-prone and harder to read.
It is also impossible to dynamically rewrite functions using eval
to add '&&' at the desired positions while keeping correct precedence of command groups.
If you're willing to proceed, I could re-purpose my proposal to be
an option to 'eval' that could be used this way
For some context, we are routinely writing scripts that are distributed
to many nodes in a cloud infrastructure and
it would really help us to write more robust scripts.
Example of the problem we're trying to solve:
Thanks for your time,
Hugues