[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ed] Trailing spaces in filenames

From: John Cowan
Subject: Re: [Bug-ed] Trailing spaces in filenames
Date: Thu, 18 Dec 2014 19:25:29 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

Antonio Diaz Diaz scripsit:

> In environments where command and file name are on the same line,
> like the shell or the ed command mode, the beginning of the file
> name needs to be marked somehow. In the case of ed, just escaping
> the first space is enough to mark the beginning of the file name:

The issue isn't the beginning, it's the end.  All ed-like editors (including
ex modes of vi-like editors) strip spaces from the end of filename arguments,
as does the shell, unless they are explicitly escaped.  So if you
are opening a file whose name is 'foo   ' (three spaces), you need
to say ':e foo\ \ \ ' to the editor, because ':e foo   ' opens the
file 'foo'.  I strongly agree that GNU ed should behave this way too.

> It will be even saner when the authors of rlfe fix this minor bug in
> their code. :-)

Not a bug, but working-as-designed, so that you can type the first letters
of the next argument after doing filename completion.

John Cowan          http://www.ccil.org/~cowan        address@hidden
Sir, I quite agree with you, but what are we two against so many?
    --George Bernard Shaw,
         to a man booing at the opening of _Arms and the Man_

reply via email to

[Prev in Thread] Current Thread [Next in Thread]