[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: Thu, 18 Dec 2014 17:10:47 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

Gabriel Farrell wrote:
Yes! My point exactly. It's inconsistent!

  Spaces before filename: counted only when escaped
  Spaces after filename: counted even when they're not escaped

It is not inconsistent. It is just a limitation of the user interface.

In full screen editors, when you press the key to load a file the program prompts you to enter a file name and, usually, uses the file name as given, spaces included.

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:

$ echo "Hello, world" > "   a.txt"
$ ed -v
e \   a.txt
Hello, world
rm "   a.txt"

This small change leads us to a saner world where spaces on both sides
of the filename are only counted when escaped.

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


reply via email to

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