On Mon, Dec 15, 2014 at 1:33 PM, Antonio Diaz Diaz <[email protected]> wrote:
> Gabriel Farrell wrote:
>>
>> Well, ed currently ignores leading spaces. And vi and ex both ignore
>> leading and trailing.
>
> Ed does not ignore leading spaces. You only need to escape them:
>
> $ echo "Hello, world" > " a.txt"
> $ ed -v
> e \ a.txt
> 13
> ,p
> Hello, world
> f
>  a.txt
> q
> $

Yes! My point exactly. It's inconsistent!

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

This small change leads us to a saner world where spaces on both sides
of the filename are only counted when escaped. And that is good
because this escaping is useful only in those rare, unsettling cases
when a filename must begin or end with spaces.

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

Reply via email to