Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: debug functions
- X-seq: zsh-users 26502
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Pier Paolo Grassi <pierpaolog@xxxxxxxxx>
- Cc: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: Re: debug functions
- Date: Wed, 10 Feb 2021 14:56:21 -0800
- Archived-at: <https://zsh.org/users/26502>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2021-02/CAH%2Bw%3D7Y8O7e7Yy7bcK9fm1Yx_966L4g3LiKPxT_GOX9hxeGe_g%40mail.gmail.com>
- In-reply-to: <CAP+y1xC9h5nOC_TBApaPf_qYSUN4=vApbmVvVQ07TE=uh467Aw@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAP+y1xC9h5nOC_TBApaPf_qYSUN4=vApbmVvVQ07TE=uh467Aw@mail.gmail.com>
On Wed, Feb 10, 2021 at 2:08 PM Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
>
> function_name (){
> functions -T $0
> ...
> }
I think it'd be a bit convoluted ...
function_name () {
if [[ -o xtrace ]]
then
# The real function body here
else
functions -T function_name
{
function_name "$@"
} always {
functions +T function_name
}
fi
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author