[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: |
Ryan Cunningham |
Subject: |
Re: in error messages, do not output raw non-printable characters to the terminal |
Date: |
Wed, 10 Sep 2014 06:14:40 -0700 |
Maybe BASH should instead output "$'\r'" in the error message in your case.
--
Sent from my iPad
> On Sep 10, 2014, at 1:58 AM, Vincent Lefevre <address@hidden> wrote:
>
> In error messages, raw non-printable characters from arguments should
> not be output without transformation, at least if this is on a terminal.
> If stderr has been redirected, this is more a matter of choice.
>
> An example: type "cd /^M" where ^M is a CR character (e.g. obtained by
> typing ^V ^M). One gets on the terminal:
>
> : No such file or directory
>
> which is not very informative. This leads to this kind of questions:
>
>
> http://unix.stackexchange.com/questions/154408/cant-cd-to-home-user-when-sourcing-a-script
>
> IMHO, in this case, bash should do like zsh, which replaces the CR
> character by the character sequence "^M".
>
> --
> Vincent Lefèvre <address@hidden> - Web: <https://www.vinc17.net/>
> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
>