[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is it normal that set -x unset commands dont display special chars i
From: |
Chet Ramey |
Subject: |
Re: is it normal that set -x unset commands dont display special chars in the content |
Date: |
Sun, 28 Feb 2021 19:03:50 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
On 2/28/21 6:19 PM, kfm@plushkava.net wrote:
The check for shell special characters, which results in single quoting,
comes before whether there are any characters that would require ANSI-C
quoting. This is not specific to unset.
In fairness, I don't think it's strictly incorrect to say that the outcome
is different "for" one of two commands used in a trivial example. I was
only attempting to clarify the circumstances that begat the original question.
I understand. The point is that it's faulty reasoning to say that it's a
difference between two commands when there are more differences than the
(builtin) command name itself. It's one of the first rules of
troubleshooting: reduce the number of variables between cases.
In this case, running `:' and `unset' with the same arguments would have
shown that that difference was in how the arguments are treated, not the
builtin itself.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/