GNU bug report logs - #27361
24.4; eshell/echo silently ignores -n argument

Previous Next

Package: emacs;

Reported by: Phil Hagelberg <phil <at> hagelb.org>

Date: Wed, 14 Jun 2017 16:17:02 UTC

Severity: wishlist

Found in version 24.4

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: npostavs <at> users.sourceforge.net
To: Phil Hagelberg <phil <at> hagelb.org>
Cc: 27361 <at> debbugs.gnu.org
Subject: bug#27361: 24.4; eshell/echo silently ignores -n argument
Date: Mon, 19 Jun 2017 00:11:34 -0400
Phil Hagelberg <phil <at> hagelb.org> writes:

> When using eshell, the `echo' built-in doesn't respect the -n argument,
> which is supposed to suppress the trailing newline.
>
> Sometimes this is not a problem because you can see for yourself that
> eshell did the wrong thing, but if you are piping it directly to another
> command, it's easy to miss.
>
> The eshell/echo function should be changed to either accept the -n
> argument and omit the newline, or it should complain that -n is not a
> supported argument.

It's not ignored, but eshell always adds a newline before the prompt.
Furthermore, the argument has the opposite sense to the traditional
shell interpretation:

    ~/src $ echo x | od -c
    0000000   x
    0000001
    ~/src $ echo -n x | od -c
    0000000   x  \n
    0000002





This bug report was last modified 3 years and 123 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.