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 688436d674
commit 3c5f3c4e91
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 path without file extension
.IP {/.} .IP {/.}
basename without file extension basename without file extension
.IP {{} .IP {{
literal '{' literal '{' (an escape sequence)
.IP }}
literal '}' (an escape sequence)
.RE .RE
If no placeholder is present, an implicit "{}" at the end is assumed. 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 Notice that you can use "{{" and "}}" to escape "{" and "}" respectively, which is especially
escape the first "{". For example "{{}}" expands to "{}", and "{{}{{}}}" expands to "{{}". useful if you need to include the literal text of one of the above placeholders.
Examples: Examples:

View File

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