Source-Changes archive

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

CVS commit: src/bin/sh



Module Name:    src
Committed By:   kre
Date:           Thu Nov 16 19:41:02 UTC 2017

Modified Files:
        src/bin/sh: output.c

Log Message:
Improve quoting in xtrace (-x) output ... if a string ("word") to be
output includes a single quote (') then see if using double-quotes
to quote it is reasonable (if no chars that are magic in " also appear).
If so, and if the string is not entirely the ' character, then
use " quoting.  This avoids some ugly looking results (occasionally).

Also, fix a bug introduced about 20 months ago where null strings
in xtrace output are dropped, instead of made explicit ('').
To observe this, before you get the fix: set -x; echo ''   (or similar.)

Move a comment from the wrong place to the right place.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/bin/sh/output.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index