[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
in error messages, do not output raw non-printable characters to the ter
From: |
Vincent Lefevre |
Subject: |
in error messages, do not output raw non-printable characters to the terminal |
Date: |
Wed, 10 Sep 2014 10:58:25 +0200 |
User-agent: |
Mutt/1.5.23-6361-vl-r59709 (2014-07-25) |
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 <vincent@vinc17.net> - 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)
- in error messages, do not output raw non-printable characters to the terminal,
Vincent Lefevre <=