Lines Matching defs:sh

3 # Tests for the :sh= variable assignment operator, which runs its right-hand
10 # The assignment operator is directly preceded by the ':sh'.
11 VAR:sh= echo colon-sh
12 .if ${VAR} != "colon-sh"
16 # It is also possible to have whitespace around the :sh assignment
18 VAR :sh = echo colon-sh-spaced
19 .if ${VAR} != "colon-sh-spaced"
23 # Until 2020-10-04, the ':sh' could even be followed by other characters.
38 # Until 2020-10-04, the last of them was interpreted as the ':sh'
49 # just looked for the previous ":sh", without taking any contextual
53 # The variable modifier ':sh' and the assignment operator modifier ':sh'.
57 VAR.${:Uecho 123:sh}= ok-123
62 # Same pattern here. Until 2020-10-04, the ':sh' inside the nested expression
63 # was taken for the :sh assignment operator modifier, even though it was
71 # ':sh'.
78 # the ':sh' assignment operator modifier. Let's see what happens ...
83 # The variable name therefore ends before the first ':sh', and the last
84 # ':sh' turns the assignment operator into the shell command evaluation.
87 # The ':sh' is the only word that may occur between the variable name and
91 VAR :sh :sh :sh :sh= echo multiple
96 # The word ':sh' is not the only thing that can occur after a variable name.
98 # expanding nested expressions, the token ' :sh' can be used to add arbitrary
103 # ':sh', the effective assignment operator becomes '=', not '!='.
104 VAR :sh(Put a comment here)= comment in parentheses
113 VAR :sh{Put}((((a}{comment}}}}{here}= comment in braces
118 # The assignment modifier ':sh' can be combined with the assignment operator
119 # '+='. In such a case the ':sh' is silently ignored, and the effective
124 VAR :sh += echo two
129 # The assignment modifier ':sh' can be combined with the assignment operator
130 # '!='. In such a case the ':sh' is silently ignored, and the effective
135 VAR :sh != echo echo echo echo spaces-around
141 # ':sh', the ':sh' becomes part of the variable name, as the parser only
144 VAR:sh != echo echo echo echo space-after
145 .if ${${:UVAR\:sh}} != "echo echo echo space-after"
146 . error ${${:UVAR\:sh}}