Format strings
Format strings are used for dynamic texts, such as prompts
Format strings are used for prompts, but can also be used directly using the control-format control on any handle that supports output. No tailing new line is added, so it needs to be added manually if required.
Example
538 (* 0) "cat" ~> control %stdout sni:73 "The current tag is: $*\n" The current tag is: 538 (* 0) "cat" 538 (* 0) "cat" ~>
Currently, the following variables are supported in prompts:
Variable | Meaning | Example output |
---|---|---|
$A |
Ampersand | & |
$B |
Pipe | | |
$C |
Opening bracket | ( |
$E |
US-ASCII Escape (0x1B) | N/A |
$F |
Closing bracket | ) |
$G |
Greater than | > |
$H |
Backspace | N/A |
$L |
Less than | < |
$Q |
Equal | = |
$S |
Space | |
$$ |
Dollar sign | $ |
$_ |
New line | N/A |
$* |
Current tag | 538 (* 0) "cat" |
$: |
Output handle | <none> |
$R |
Clear (reset) terminal attributes | N/A |
$P or $. |
Alias for $* |
538 (* 0) "cat" |
$D |
Reserved for current date | N/A |
$T |
Reserved for current time | N/A |
$V |
Reserved for version number | N/A |
$N |
Reserved for DOS compatibility (current drive) | N/A |
$+ |
Reserved for DOS compatibility (pushd-level) | N/A |
$M |
Reserved for DOS compatibility (remote name of current drive) | N/A |
All others | Reserved for future use | N/A |