Re: nvi problems with '|' in exrc

2019-10-11 Thread adr
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

Re: nvi problems with '|' in exrc

2019-10-11 Thread adr
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

Re: nvi problems with '|' in exrc

2019-10-10 Thread adr
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

Re: nvi problems with '|' in exrc

2019-10-10 Thread Christian Weisgerber
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

Re: nvi problems with '|' in exrc

2019-10-10 Thread adr
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,

nvi problems with '|' in exrc

2019-10-10 Thread adr
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