${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.

Examples

Replace all values
1
2
value="a aa aaa aaaa"
echo $value:fs/a/z/
Output:
1
z zz zzz zzzz
Replace first two values
1
2
value="a aa aaa aaaa"
echo $value:F:2:s/a/z/
Output:
1
z za aaa aaaa
BashSupport Pro 是一款支持 f** 的 **Zsh 集成开发环境 - 立即试用
© 2020–2024 Joachim Ansorg
声明
隐私政策
许可条款