zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Did something change about completion and xtrace ?
Date: Wed, 10 Feb 2021 11:07:40 -0800	[thread overview]
Message-ID: <CAH+w=7Z1ifgTBp6=CdBNDxicO4uNAVwJ6WLc=wK3v9znwUFe1A@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7Y_gueP3kssRFwM=js505ESLVAxBxSxFkqNbCo4FF6i3g@mail.gmail.com>

On Wed, Feb 10, 2021 at 10:01 AM Bart Schaefer
<schaefer@brasslantern.com> wrote:
>
> Is there something more than just toggling opts[XTRACE] now required?
> Ideas where to look?

So evidently (?) this never worked with completion.  Finally tracked
it down with gdb.

The following seems to "fix" it and does not interfere with
_complete_debug.  Any objections?

diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index 958fef8e7..5162d97dc 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -821,6 +821,7 @@ callcompfunc(char *s, char *fn)
        sfcontext = SFC_CWIDGET;
        NEWHEAPS(compheap) {
            LinkList largs = NULL;
+           int oxt = isset(XTRACE);

            if (*cfargs) {
                char **p = cfargs;
@@ -830,7 +831,9 @@ callcompfunc(char *s, char *fn)
                while (*p)
                    addlinknode(largs, dupstring(*p++));
            }
+           opts[XTRACE] = 0;
            cfret = doshfunc(shfunc, largs, 1);
+           opts[XTRACE] = oxt;
        } OLDHEAPS;
        sfcontext = osc;
        endparamscope();


  reply	other threads:[~2021-02-10 19:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-06  5:03 Bart Schaefer
2021-02-10 18:01 ` Bart Schaefer
2021-02-10 19:07   ` Bart Schaefer [this message]
2021-02-10 21:53     ` Phil Pennock
2021-02-10 23:02       ` Bart Schaefer
2021-02-11 23:49         ` Phil Pennock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7Z1ifgTBp6=CdBNDxicO4uNAVwJ6WLc=wK3v9znwUFe1A@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).