Antonio Diaz Diaz scripsit:

> You are confusing two things here. Adding a space after doing
> filename completion so that you can type the next argument is fine.
> What is a fatal error is to pass such trailing space to the
> application. It is rlfe the one that should be stripping the
> trailing space, as the shell does, not ed.

That would require readline to keep track of which trailing spaces
were supplied by completion and which were not, which I think is
unreasonable.  If all trailing spaces were stripped, a command like

s/foo/foo 

(note trailing space) would be corrupted.

> Not only that. I have just tried the ex mode of vim, and inner
> spaces also need to be escaped or it gives the error "Only one file
> name allowed". I think this behaviour is plain stupid for an editor.

There are vi commands like n which accept multiple file names.

> Taking the file name as given is the easiest, safest, and less
> arbitrary thing to do. It is also what full screen editors (CLI or
> GUI) do, and what GNU ed has done for 20 years.

It's not what vi does in vi mode either, and that is a full screen editor.

> IMO, it would be more consistent for all users if ex and vi began
> treating file names like editors do, instead of like shells do.

There are many ex/vi implementations, and they all behave the same
way, as does Solaris ed.

-- 
John Cowan          http://www.ccil.org/~cowan        [email protected]
SAXParserFactory [is] a hideous, evil monstrosity of a class that should
be hung, shot, beheaded, drawn and quartered, burned at the stake,
buried in unconsecrated ground, dug up, cremated, and the ashes tossed
in the Tiber while the complete cast of Wicked sings "Ding dong, the
witch is dead."  --Elliotte Rusty Harold on xml-dev

_______________________________________________
bug-ed mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-ed

Reply via email to