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

Re: Completion bug after assignment,unset



On Jul 22, 11:50am, Daniel Shahaf wrote:
}
}     RPS2=$PS2; unset PS2 ; setopt <TAB>
} 
} completes files rather than options.

Hm, looks as if any "command" consisting of nothing but an assignment
is mishandled, i.e.

torch% x=y ; <TAB>

completes file names rather than command names.  $compstate[context]
is stuck at "value" for the entire remainder of the line, and debug
output indicates it's getting that way somewhere in the C internals.

It's passing through the default: branch of "switch (linwhat)" in
callcompfunc() via docompletion() at zle_tricky.c:857 where linwhat
is zero (aka IN_NOTHING) and cmdstr is NULL.  I'm not following by
what logic that makes it value context, nor why cmdstr = NULL even
if a command name follows the semicolon.



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