diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-06-04 21:01:53 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-06-04 21:01:53 +0200 |
commit | 16e9b0dc459f3ac198495127498b2255eb94c1ce (patch) | |
tree | 6630ede1ece5782d0d72cffdc466df87386be67e /doc/sciteco.7.template | |
parent | dd408c9ae23d37d53e0ca7d3d75e33fdae2efdcb (diff) | |
download | sciteco-16e9b0dc459f3ac198495127498b2255eb94c1ce.tar.gz |
added ^E@ string building character
* allows expansion of Q-Register contents with UNIX shell quoting
* This especially improves the usefulness of the EC/EG commands as
we can reliably determine that a TECO string (ie. Q-Register)
will end up as a single argument to the spawned process.
A previous workaround was to enclose ^EQ in quotes, but it does
not work e.g. if the register contains the wrong kind of quotes or
other magic shell characters.
* NOTE: In order to be absolutely sure about the runtime behaviour of
EC plus ^E@, you will have to enable UNIX98 shell emulation in portable
macros.
Diffstat (limited to 'doc/sciteco.7.template')
-rw-r--r-- | doc/sciteco.7.template | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template index eab26e5..9b31c7d 100644 --- a/doc/sciteco.7.template +++ b/doc/sciteco.7.template @@ -1398,9 +1398,12 @@ When \fB^V\fP is not followed by \fB^V\fP, a single character .BI ^W c Analogous to \fB^V\fP, but upper-cases characters. .TP -.BI ^EQ q -Expands to the string contents of the Q-Register specified by -\fIq\fP. +.BI ^E\(rs q +Expands to the formatted number stored in the +numeric part of Q-Register \fIq\fP. +The number is formatted according to the current +radix and exactly the same as the backslash (\fB\(rs\fP) +command would format it. Currently, long Q-Register names have a separate independant level of string building character processing, allowing you to build Q-Register names whose content is then expanded. @@ -1411,12 +1414,19 @@ part of Q-Register \fIq\fP. For instance if register \(lqA\(rq contains the code 66, \(lq^EUa\(rq expands to the character \(lqB\(rq. .TP -.BI ^E\(rs q -Expands to the formatted number stored in the -numeric part of Q-Register \fIq\fP. -The number is formatted according to the current -radix and exactly the same as the backslash (\fB\(rs\fP) -command would format it. +.BI ^EQ q +Expands to the string contents of the Q-Register specified by +\fIq\fP. +.TP +.BI ^E@ q +Expands to the quoted string contents of the Q-Register +specified by \fIq\fP. +The quoting will be such that an UNIX98 \(lq/bin/sh\(rq will +interpret the quoted string like the original contents of +\fIq\fP. +This is useful when generating UNIX shell code or when passing +registers with unknown contents as parameters to external +commands using the \fBEC\fP command. .TP .BI ^E c All remaining \fB^E\fP combinations are passed down |