Re: vi(1): documenting :s

2017-06-20 Thread Jason McIntyre
On Tue, Jun 20, 2017 at 01:30:35AM -0600, Anthony J. Bentley wrote: > Hi, > > Jason McIntyre writes: > > shouldn;t it be that we should show the suspend command as > > > > sus[pend] > > > > the shortest "s" matches "substitute", right. so we show it as > > > > s[ubstitute] > > > > i

Re: vi(1): documenting :s

2017-06-20 Thread Anthony J. Bentley
Hi, Jason McIntyre writes: > shouldn;t it be that we should show the suspend command as > > sus[pend] > > the shortest "s" matches "substitute", right. so we show it as > > s[ubstitute] > > i cannot find any text that describes what "su" *should* match though, > so i'm not sure.

Re: vi(1): documenting :s

2017-06-19 Thread Jason McIntyre
On Mon, Jun 19, 2017 at 03:57:35AM -0600, Anthony J. Bentley wrote: > Hi, > > Jason McIntyre writes: > > ok by me. note that posix ex(1) does detail a working [s]ubstitute command, > > so i'm not sure whether we should support this or not. > > Hm, so it does. I think I would prefer to follow

Re: vi(1): documenting :s

2017-06-19 Thread Anthony J. Bentley
Theo Buehler writes: > This looks like a reasonable approach and it appears to work. When I > looked at this after jmc's question, I was scared off by the comment > > > * Adding new commands starting with 's' may break the substitute command > code > > * in ex_cmd() (the ex parser). Read

Re: vi(1): documenting :s

2017-06-19 Thread Theo Buehler
On Mon, Jun 19, 2017 at 03:57:35AM -0600, Anthony J. Bentley wrote: > Hi, > > Jason McIntyre writes: > > ok by me. note that posix ex(1) does detail a working [s]ubstitute command, > > so i'm not sure whether we should support this or not. > > Hm, so it does. I think I would prefer to follow

Re: vi(1): documenting :s

2017-06-19 Thread Anthony J. Bentley
Hi, Jason McIntyre writes: > ok by me. note that posix ex(1) does detail a working [s]ubstitute command, > so i'm not sure whether we should support this or not. Hm, so it does. I think I would prefer to follow POSIX in this case. Here's a diff to allow "substitute" to work. Annoyingly, there's

Re: vi(1): documenting :s

2017-06-15 Thread Jason McIntyre
On Thu, Jun 15, 2017 at 02:14:46AM -0600, Anthony J. Bentley wrote: > Hi, > > From vi(1): > > [range] s[ubstitute] [/pattern/replace/] ??[options] [count] [flags] > [range] & [options] [count] [flags] > [range] ~ [options] [count] [flags] > Make substitutions. The