Re: An xtrace variant

2020-07-02 Thread Chet Ramey
On 6/29/20 10:28 PM, Dale R. Worley wrote: > Robert Elz writes: >> The NetBSD sh (this time alone I believe) also has a -X (not that part, I >> think one or two other shells also have unrelated -X options) which acts >> just like -X, except it locks the output to stderr as it is at the time >> the

Re: An xtrace variant

2020-06-29 Thread Dale R. Worley
Robert Elz writes: > The NetBSD sh (this time alone I believe) also has a -X (not that part, I > think one or two other shells also have unrelated -X options) which acts > just like -X, except it locks the output to stderr as it is at the time > the -X option is enabled (until -X is unset). [...]

Re: An xtrace variant

2020-06-29 Thread Eli Schwartz
On 6/28/20 9:49 PM, Dale R. Worley wrote: > Eli Schwartz writes: >> Why not just run bash -x script-name without the bash -l option and >> without $BASH_ENV set? >> >> The first is implicitly true based on your stated command line. The >> second doesn't seem like a high bar to set, and it's not ex

Re: An xtrace variant

2020-06-29 Thread Chet Ramey
On 6/28/20 9:49 PM, Dale R. Worley wrote: > Eli Schwartz writes: >> Why not just run bash -x script-name without the bash -l option and >> without $BASH_ENV set? >> >> The first is implicitly true based on your stated command line. The >> second doesn't seem like a high bar to set, and it's not ex

Re: An xtrace variant

2020-06-29 Thread Robert Elz
Date:Sun, 28 Jun 2020 15:19:27 -0400 From:wor...@alum.mit.edu (Dale R. Worley) Message-ID: <87h7uv0zi8@hobgoblin.ariadne.com> | For a long time, I've wanted a variant of -x that only echoed the simple | commands after bash is done executing the startup files.

Re: An xtrace variant

2020-06-28 Thread Dale R. Worley
Eli Schwartz writes: > Why not just run bash -x script-name without the bash -l option and > without $BASH_ENV set? > > The first is implicitly true based on your stated command line. The > second doesn't seem like a high bar to set, and it's not exactly default > behavior... if you really do need

Re: An xtrace variant

2020-06-28 Thread Eli Schwartz
On 6/28/20 3:19 PM, Dale R. Worley wrote: > When debugging a shell script, a useful command is: > > bash -x script-name > > The deficiency of this is that "-x" causes all simple commands in your > startup files to be echoed as they are executed, and often this output > is a lot longer than th

An xtrace variant

2020-06-28 Thread Dale R. Worley
When debugging a shell script, a useful command is: bash -x script-name The deficiency of this is that "-x" causes all simple commands in your startup files to be echoed as they are executed, and often this output is a lot longer than the output from the commands in the script. For a long ti