Fix documentation for brace escapes

This commit is contained in:
Thayne McCombs 2023-07-18 00:16:01 -06:00 committed by David Peter
parent d9b69c8405
commit 069b181625
2 changed files with 8 additions and 5 deletions

10
doc/fd.1 vendored
View File

@ -380,14 +380,16 @@ parent directory
path without file extension
.IP {/.}
basename without file extension
.IP {{}
literal '{'
.IP {{
literal '{' (an escape sequence)
.IP }}
literal '}' (an escape sequence)
.RE
If no placeholder is present, an implicit "{}" at the end is assumed.
If you need to include the literal text of one of the placeholders, you can use "{{}" to
escape the first "{". For example "{{}}" expands to "{}", and "{{}{{}}}" expands to "{{}".
Notice that you can use "{{" and "}}" to escape "{" and "}" respectively, which is especially
useful if you need to include the literal text of one of the above placeholders.
Examples:

View File

@ -808,7 +808,8 @@ impl clap::Args for Exec {
'{//}': parent directory\n \
'{.}': path without file extension\n \
'{/.}': basename without file extension\n \
'{{}': literal '{' (for escaping)\n\n\
'{{': literal '{' (for escaping)\n \
'}}': literal '}' (for escaping)\n\n\
If no placeholder is present, an implicit \"{}\" at the end is assumed.\n\n\
Examples:\n\n \
- find all *.zip files and unzip them:\n\n \