[Top][All Lists]

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

Re: [Bug-ed] Trailing spaces in filenames

From: Antonio Diaz Diaz
Subject: Re: [Bug-ed] Trailing spaces in filenames
Date: Mon, 22 Dec 2014 19:38:51 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

John Cowan wrote:
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.

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.

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.

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. 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.

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.

Best regards,

reply via email to

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