From 2b39685741ebeaa472fd2a188d22a0081f52e838 Mon Sep 17 00:00:00 2001 From: ANANYASHAH29 <156574916+ANANYASHAH29@users.noreply.github.com> Date: Fri, 25 Jul 2025 09:03:14 +0530 Subject: [PATCH 1/2] Update README.md Added Shell Syntax notes --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 6357ed7..d10f902 100755 --- a/README.md +++ b/README.md @@ -59,3 +59,23 @@ BB3 is made up of the following components: * [Crowd supply](https://www.crowdsupply.com/envox/eez-bb3) (kit only, excl. EU) --- Please note that some previous board types and revisions that could be still usable in some cases can be found under *[previous design](https://github.com/eez-open/modular-psu/tree/master/previous%20designs)* folder. + +### Notes on Shell Syntax (Community Feedback) +In shell scripting, the syntax used for loops can impact portability and readability across different environments. +Potential Issue with Braces: + + while (( i++ < 10 )) { echo i is $i } + +may not work reliably in all shell environments. For instance, in Zsh, this syntax will fail unless SHORT_LOOPS is explicitly enabled. +It can also cause issues with syntax highlighting and script execution. + +* Alternate Approach: To ensure broader compatibility and clearer syntax, prefer the standard do ... done block structure: + +i=0 +while (( i++ < 10 )); do + echo "i is $i" +done + +This format is - Compatible with most POSIX-compliant shells (e.g., Bash, Zsh, etc.) and Syntax-highlight friendly in editors and IDEs. + + From 63e584e6174d7c3c145097c59caf8ca5c89a679c Mon Sep 17 00:00:00 2001 From: ANANYASHAH29 <156574916+ANANYASHAH29@users.noreply.github.com> Date: Fri, 25 Jul 2025 09:21:58 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d10f902..ba2e9ef 100755 --- a/README.md +++ b/README.md @@ -72,7 +72,8 @@ It can also cause issues with syntax highlighting and script execution. * Alternate Approach: To ensure broader compatibility and clearer syntax, prefer the standard do ... done block structure: i=0 -while (( i++ < 10 )); do +while (( i++ < 10 )) +do echo "i is $i" done