From: npostavs@users.sourceforge.net
To: Phil Hagelberg <phil@hagelb.org>
Cc: 27361@debbugs.gnu.org
Subject: bug#27361: 24.4; eshell/echo silently ignores -n argument
Date: Mon, 19 Jun 2017 00:11:34 -0400 [thread overview]
Message-ID: <87fuewr4zt.fsf@users.sourceforge.net> (raw)
In-Reply-To: <87tw3ilf4i.fsf@hagelb.org> (Phil Hagelberg's message of "Wed, 14 Jun 2017 09:15:41 -0700")
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
next prev parent reply other threads:[~2017-06-19 4:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 16:15 bug#27361: 24.4; eshell/echo silently ignores -n argument Phil Hagelberg
2017-06-19 4:11 ` npostavs [this message]
2017-06-19 15:22 ` Phil Hagelberg
2017-06-20 1:57 ` Glenn Morris
2017-06-20 2:17 ` Glenn Morris
2020-09-15 15:27 ` Lars Ingebrigtsen
2022-01-16 7:19 ` bug#27361: " Jim Porter
2022-01-20 9:36 ` Lars Ingebrigtsen
2022-01-21 1:27 ` Jim Porter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fuewr4zt.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=27361@debbugs.gnu.org \
--cc=phil@hagelb.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).