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

Re: zsh (live version): setting globassign crashes completion



On Tue, 2 Jun 2015 22:17:02 +1000
Aleksandrina Nikolova <infinite.craziness@xxxxxxxxx> wrote:
> Today I installed the latest git commit and was greeted by:
>      _main_complete:388: _lastcomp: assignment to invalid subscript range
> after any completion I tried to do. Removing all configs (global and 
> local) fixed the problem so I started enabling things one by one to see 
> what is causing this. Bottom line:
> a default setup with only:
>      autoload -Uz compinit
>      compinit
>      setopt globassign
> gives the above stated error. Sorry, I don't have time to further 
> investigate, maybe someone else can look it up.

We certainly shouldn't ever depend on the setting of the glob_assign
option within the completion scripts, so this fix is a sensible thing to
do anyway and ought to deal with it.

What is actually triggering the error is a bit obscure,
though... nothing obviously relevant has changed.  I guess some new and
otherwise unproblematic assignment just picked up this alternative
meaning.

pws

diff --git a/Completion/compinit b/Completion/compinit
index 9470c92..79f9d42 100644
--- a/Completion/compinit
+++ b/Completion/compinit
@@ -142,6 +142,7 @@ _comp_options=(
     NO_cshnullglob
     NO_cshjunkiequotes
     NO_errexit
+    NO_globassign
     NO_globsubst
     NO_histsubstpattern
     NO_ignorebraces



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