Skip to content

Commit 6d4bf58

Browse files
committed
Merge branch 'jk/arith-expansion-coding-guidelines'
The coding guideline for shell scripts instructed to refer to a variable with dollar-sign inside arithmetic expansion to work around a bug in old versions of dash, which is a thing of the past. Now we are not forbidden from writing $((var+1)). * jk/arith-expansion-coding-guidelines: CodingGuidelines: drop arithmetic expansion advice to use "$x"
2 parents e9acbd6 + 32b5fe7 commit 6d4bf58

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Documentation/CodingGuidelines

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ For shell scripts specifically (not exhaustive):
9595

9696
- We use Arithmetic Expansion $(( ... )).
9797

98-
- Inside Arithmetic Expansion, spell shell variables with $ in front
99-
of them, as some shells do not grok $((x)) while accepting $(($x))
100-
just fine (e.g. dash older than 0.5.4).
101-
10298
- We do not use Process Substitution <(list) or >(list).
10399

104100
- Do not write control structures on a single line with semicolon.

0 commit comments

Comments
 (0)