bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#27361: 24.4; eshell/echo silently ignores -n argument


From: npostavs
Subject: bug#27361: 24.4; eshell/echo silently ignores -n argument
Date: Mon, 19 Jun 2017 00:11:34 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)

Phil Hagelberg <phil@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






reply via email to

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