${name:f}: Repeat modifier
Repeats the immediately following modifier until the value does not change anymore.
Use :F<expr>:... to control the number of repetitions.
Links
Examples
- Replace all values
- Output:
1 2value="a aa aaa aaaa" echo $value:fs/a/z/1z zz zzz zzzz - Replace first two values
- Output:
1 2value="a aa aaa aaaa" echo $value:F:2:s/a/z/1z za aaa aaaa
BashSupport Pro is a Zsh IDE with support for $varName:f – try it now!