bug-bash
[Top][All Lists]
Advanced

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

Re: in error messages, do not output raw non-printable characters to the


From: Ángel González
Subject: Re: in error messages, do not output raw non-printable characters to the terminal
Date: Wed, 10 Sep 2014 20:04:51 +0200

Steve Simmons wrote:
> > IMHO, in this case, bash should do like zsh, which replaces the CR
> > character by the character sequence "^M".
> 
> This doesn't seem like a good idea. At our site it leads our zsh users
> to send us complaints that they don't have a file with the two-character
> name ^M.
> 
> Beyond there, there are several drawbacks. I'd hate to see the built-in
> echo diverge from system /bin/echo (or diverge further, as the case may
> be). It would also break this current behavior (snip)

Note that Vicent is talking about replacing them *in error messages*.
echo should be left as-is.

I agree with Ryan that it should output $'\r'

a) It's more consistent, as that's already output on other errors:

> $ ^M
> bash: $'\r': command not found

> cd ^M
> : No such file or directory


b) $'\r' is an appropiate input, as opposed to manually retyping ^M (hopefully 
this should help when people comes confused about not having such file)






reply via email to

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