blob: e9ec5fedb7db4401e059b65ca07a0c53a0c07e18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/dash
# sh4
Variable=${VariableB:-{VariableC}}
Variable=${VariableB:-${VariableC:-{Var3:=eng}}}
# This gets marked as an error while its ok
Variable=${VariableB:-${VariableC:-{Var3:=eng}}}
Variable=${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}}
Variable=${VariableB:=${VariableC:={Var3:=${Var4:-${Var5:-eng}}}}}
Variable=${VariableB:=${VariableC:={Var3:=${Var4:-${Var5:-$Var6}}}}}
# These are OK
Variable="${VariableB:-${VariableC:-{Var3:=eng}}}"
Variable="${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}}"
# This gets marked as an error too
: ${VariableB:-${VariableC:-{Var3:=eng}}}
: ${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}}
# This is OK
: ${VariableB:-${VariableC:-eng}}
: "${VariableB:-${VariableC:-eng}}"
# First line is OK except its missing a closing "}",
# so second line should have some error highlighting
Variable=${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}
Variable=${VariableB:-${VariableC:-{Var3:=eng}}
|