From 2aa950fe9ca3e658ab30b1f6f36787f3b34cad25 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Tue, 19 Apr 2022 23:26:26 +0200 Subject: [PATCH] Remove a conflict between the text variable substitution like set text = "mytext" set newtext = new.{$text} echo $newtext and the command circbyline, which may have to process strings containing braces {...} without any change to the string. Do not call cp_doglob() when command circbyline is executed. --- src/frontend/control.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/control.c b/src/frontend/control.c index 7f5b05bd2..64c8884a9 100644 --- a/src/frontend/control.c +++ b/src/frontend/control.c @@ -152,7 +152,9 @@ docommand(wordlist *wlist) wlist = cp_bquote(wlist); pwlist(wlist, "After backquote substitution"); - wlist = cp_doglob(wlist); + /* Do not expand braces after command circbyline, keep them intact */ + if (!eq(wlist->wl_word, "circbyline")) + wlist = cp_doglob(wlist); pwlist(wlist, "After globbing"); pwlist_echo(wlist, "Becomes >");