Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Set -x for scripts globally / recursively



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