Skip to content

Commit 32b5fe7

Browse files
peffgitster
authored andcommitted
CodingGuidelines: drop arithmetic expansion advice to use "$x"
The advice to use "$x" rather than "x" in arithmetric expansion was working around a dash bug fixed in 0.5.4. Even Debian oldstable has 0.5.8 these days. And in the meantime, we've added almost two dozen instances of the "x" form which you can find with: git grep '$(([a-z]' and nobody seems to have complained. Let's declare this workaround obsolete and simplify our style guide. Helped-by: Danh Doan <[email protected]> Signed-off-by: Jeff King <[email protected]> Reviewed-by: Carlo Marcelo Arenas Belón <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent af6b65d commit 32b5fe7

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
@@ -97,10 +97,6 @@ For shell scripts specifically (not exhaustive):
9797

9898
- We use Arithmetic Expansion $(( ... )).
9999

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

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

0 commit comments

Comments
 (0)