Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug in completion with curly braces?



On Sun, Nov 22, 2020 at 11:17 PM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Sun, Nov 22, 2020 at 10:46 PM Felipe Contreras
> <felipe.contreras@xxxxxxxxx> wrote:
> >
> > So, in theory if the user has ignorebraces set, there would be no need
> > to use quotes for the curly braces?
>
> As far as I can tell, that should be how it works, yes.

Reviving this thread because it ended without resolution, but I do
have a patch for _complete_debug that makes the situation a little
less confusing:

diff --git a/Completion/Base/Widget/_complete_debug
b/Completion/Base/Widget/_complete_debug
index 85a0f372a..94fd4accd 100644
--- a/Completion/Base/Widget/_complete_debug
+++ b/Completion/Base/Widget/_complete_debug
@@ -14,7 +14,11 @@ integer debug_fd=-1
     exec {debug_fd}>&2 2>| $tmp
   fi

-  local -a debug_indent; debug_indent=( '%'{3..20}'(e. .)' )
+  local -a debug_indent
+  () {
+    setopt localoptions no_ignorebraces
+    debug_indent=( '%'{3..20}'(e. .)' )
+  }
   local PROMPT4 PS4="${(j::)debug_indent}+%N:%i> "
   setopt xtrace
   : $ZSH_NAME $ZSH_VERSION




Messages sorted by: Reverse Date, Date, Thread, Author