Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'book/src/command-line.md')
| -rw-r--r-- | book/src/command-line.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/book/src/command-line.md b/book/src/command-line.md index 0e492219..3d9be122 100644 --- a/book/src/command-line.md +++ b/book/src/command-line.md @@ -59,6 +59,7 @@ Aside from editor variables, the following expansions may be used: * Unicode `%u{..}`. The contents may contain up to six hexadecimal numbers corresponding to a Unicode codepoint value. For example `:echo %u{25CF}` prints `●` to the statusline. * Shell `%sh{..}`. The contents are passed to the configured shell command. For example `:echo %sh{echo "20 * 5" | bc}` may print `100` on the statusline on when using a shell with `echo` and the `bc` calculator installed. Shell expansions are evaluated recursively. `%sh{echo '%{buffer_name}:%{cursor_line}'}` for example executes a command like `echo 'README.md:1'`: the variables within the `%sh{..}` expansion are evaluated before executing the shell command. +* Register `%reg{..}`. The contents should be a single character representing the register name. For example, `:set-register a hello world` followed by `echo %reg{a}` prints `hello world` to the statusline. As mentioned above, double quotes can be used to surround arguments containing spaces but also support expansions within the quoted content unlike single quotes or backticks. For example `:echo "circle: %u{25CF}"` prints `circle: ●` to the statusline while `:echo 'circle: %u{25CF}'` prints `circle: %u{25CF}`. |