blob: 5c6ab04ce5c22b37c9fb39f5c1458fdb91fa1caf (
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/sh
# 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}}
|