Lines Matching refs:modifier
3 # Tests for the variable modifier ':from=to', which replaces the suffix
6 # This modifier is applied when the other modifiers don't match exactly.
10 # A typical use case for the modifier ':from=to' is conversion of filename
16 # The modifier applies to each word on its own.
26 # The modifier ':from=to' is therefore often combined with the modifier ':M'.
31 # Another use case for the modifier ':from=to' is to append a suffix to each
33 # matches. The same effect can be achieved with the modifier ':S,$,teen,'.
38 # The modifier ':from=to' can also be used to surround each word by strings.
40 # shell, but that's the job of the modifier ':Q'.
45 # When the modifier ':from=to' is parsed, it lasts until the closing brace
46 # or parenthesis. The ':Q' in the below expression may look like a modifier
52 # In the modifier ':from=to', both parts can contain expressions.
57 # In the modifier ':from=to', the "from" part is expanded exactly once.
62 # In the modifier ':from=to', the "to" part is expanded exactly twice.
78 # single empty word, or no word at all. The modifier ':from=to' treats it as
95 # of a SysV substitution modifier, and it was replaced with the whole match,
96 # just like in the modifier ':S'.
99 # modifier looked a lot like the code for the modifiers ':S' and ':C'.
109 # Before 2020-07-20, when a SysV modifier was parsed, a single dollar
116 # Before 2020-07-20, the modifier ':e$=x' was parsed as having a left-hand
118 # interpreted) as 'anchor at the end'. Therefore the modifier was equivalent
201 # The modifier ':from=to' can be used to replace both the prefix and a suffix
203 # modifier, and using a :C modifier for the same task looks more complicated
209 # This is not a SysV modifier since the nested expression expands
211 # XXX: As of 2024-06-30, this expression generates an "Unfinished modifier"
212 # error, while the correct error message would be "Unknown modifier" since
213 # there is no modifier named "fromto".
214 # expect+1: Unfinished modifier after "from${:D=}to}", expecting "="
219 # XXX: This specially constructed case demonstrates that the SysV modifier
221 # "fromto}...". The next modifier is a SysV modifier. ApplyModifier_SysV
222 # parses the modifier as "from${:D=}to", ending at the '}'. Next, the two
223 # parts of the modifier are parsed using ParseModifierPart, which scans
230 # As of 2020-10-06, the right-hand side of the SysV modifier is expanded
232 # modifier is split into its two parts. The second expansion happens
244 !=1>&2 printf '%-24s %-24s %-24s\n' 'word' 'modifier' 'result'
256 # The error case of an unfinished ':from=to' modifier after the '=' requires
258 # expect+1: Unfinished modifier after "$(})", expecting "}"
263 # The various ":t..." modifiers fall back to the ":from=to" modifier.
279 # Since the ":ts=" modifier is a valid form of the ":ts" modifier, don't fall
280 # back to the ":from=to" modifier.