Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Prevent a specific function from being xtrace'd
- X-seq: zsh-users 26971
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zach Riggle <zachriggle@xxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Prevent a specific function from being xtrace'd
- Date: Mon, 23 Aug 2021 19:27:03 -0700
- Archived-at: <https://zsh.org/users/26971>
- In-reply-to: <CAMP9c5=hTpffYG_EydhhtD-ig7yzZYXxKDOFrRLXAs+PmOr52Q@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAMP9c5==SoZuvHHB3U+HYu5+KwXMa7Jifjf_TFd31yxrhBiA1w@mail.gmail.com> <CAH+w=7bOCbkjRhGj8HjeJ6t-uyg7Uye26M5NnLqai+ThyXR_5A@mail.gmail.com> <CAMP9c5=hTpffYG_EydhhtD-ig7yzZYXxKDOFrRLXAs+PmOr52Q@mail.gmail.com>
On Mon, Aug 23, 2021 at 4:23 PM Zach Riggle <zachriggle@xxxxxxxxx> wrote:
>
> >>> local first_line=$(head -1 <<<$ZSH_DEBUG_CMD)
> > Egad.
> > local first_line=${ZSH_DEBUG_CMD%%$'\n'*}
>
> That's (almost!) the following line! I couldn't quite get it to work,
> looks like I was missing a $ and the *.
You can also do
local first_line=${${(f)ZSH_DEBUG_CMD}[1]}
if that seems more appealing.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author