Or as I said before, make Control-V| input the sequence 0x16|.
Escaping with will produce the
character, which is CH_LITERAL, 0x16.
So the sequence "Control-VControl-V|" in edit mode will produce a
valid | for a mapping as typing one in a :map command and saving
it with :mkexrc.
Looking at
Well, the patch is not correct because the sequence CH_LITERAL|
must be used only in a map command. I thought that it would not be
a problem when parsing the file, I don't know what I tested that
made me think that. This is what you get with dirty hacks.
At least a comment in the man page noting
A quick check confirms that '|' also works as a command separator
in exrc, so it's not clear to me if there is an actual bug or if
you are fighting against a poorly documented feature.
Hi, this is some kind of feature of nvi. You can take a look at
the sources. Apart of the traditional command
On 2019-10-10, adr wrote:
> I found that '|' can't be used in exrc files, unless a 0x16 precedes
> it. This is what the code does in seq.c. The problem is in both
> editors/nvi and base.
I have the vaguest memory that '|' might be special in exrc...
In my mutt configuration, I call vi with
I forgot to update the length of the new string.
$OpenBSD$
Index: ex/ex_source.c
--- ex/ex_source.c.orig
+++ ex/ex_source.c
@@ -38,8 +38,8 @@ int
ex_source(SCR *sp, EXCMD *cmdp)
{
struct stat sb;
- int fd, len;
- char *bp;
+ int fd, len,
I found that '|' can't be used in exrc files, unless a 0x16 precedes
it. This is what the code does in seq.c. The problem is in both
editors/nvi and base.
This is a dirty hack if someone is interested. It's for editors/nvi,
but for base would be almost identical.
adr