summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--NEWS5
-rw-r--r--README3
-rw-r--r--Src/Zle/compcore.c3
4 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4e85336ea..4946b84c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-02-11 Bart Schaefer <schaefer@zsh.org>
+
+ * unposted: NEWS, README: mention the effects of 47997.
+
+ * 47997: Src/Zle/compcore.c: disable xtrace around completions
+
2021-02-07 Oliver Kiddle <opk@zsh.org>
* 47944: Completion/BSD/Command/_bsd_pkg,
diff --git a/NEWS b/NEWS
index a5becf67b..cf270ff51 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,11 @@ The compinit function learnt a -w option to explain why compdump runs.
The zsh/datetime module's strftime builtin learnt an -n option to omit
the trailing newline when printing a formatted time.
+The XTRACE option is now disabled while running user-defined completion
+widgets. This corresponds to long-standing behavior of other user ZLE
+widgets. Use the _complete_debug widget to capture XTRACE output, or
+use "functions -T" to enable tracing of specific completion functions.
+
Changes from 5.7.1-test-3 to 5.8
--------------------------------
diff --git a/README b/README
index 9b1b1605f..3ebf75f1b 100644
--- a/README
+++ b/README
@@ -92,6 +92,9 @@ not set the new, fourth field will continue to work under both 5.8 and 5.9.
(As it happens, adding a comma after "bold" will make both 5.8 and 5.9 do the
right thing, but this should be viewed as an unsupported hack.)
+The XTRACE option is now disabled while running user-defined completion
+widgets. See NEWS.
+
Incompatibilities between 5.7.1 and 5.8
---------------------------------------
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();