Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Set -x for scripts globally / recursively
- X-seq: zsh-users 26824
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zach Riggle <zachriggle@xxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Set -x for scripts globally / recursively
- Date: Fri, 30 Jul 2021 15:06:51 -0700
- Archived-at: <https://zsh.org/users/26824>
- In-reply-to: <CAMP9c5mtT_SdK+UxWwB2RYyXwrFD6sD=7vFyqkUqtjpKrqKxTA@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAMP9c5mtT_SdK+UxWwB2RYyXwrFD6sD=7vFyqkUqtjpKrqKxTA@mail.gmail.com>
On Fri, Jul 30, 2021 at 10:39 AM Zach Riggle <zachriggle@xxxxxxxxx> wrote:
>
> Is there any way to cause the "-x" / xtrace flag to be passed into
> sub-scripts without doing so explicitly?
The only way to do this infallibly is to put "setopt xtrace" in /etc/zshenv.
If the scripts are NOT run with the -f flag, you can place that
command in a file named ".zshenv" in a temporary directory, and export
ZDOTDIR to point at that temporary directory.
The only other option is to edit the #! line of each script and change
-f to -fx.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author