zsh-workers
 help / color / mirror / code / Atom feed
* Zsh will not parse an autoload function when it has short loops
@ 2015-08-28  6:39 Sebastian Gniazdowski
  2015-08-28  6:43 ` Mikael Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Gniazdowski @ 2015-08-28  6:39 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 718 bytes --]

Hello

I've created autoload function "bug" in /usr/share/zsh/.../functions, and
when run, it gives:

bug:9: parse error near `list[$i]'

Adding echo's to the file and changing various things revealed no reaction.
This means that the file isn't actually run by zsh - apparently the message
comes from some initial parsing stage.

Here is the file:

emulate -L zsh

setopt localoptions typesetsilent localtraps extendedglob shortloops

while (( 1 )); do
    # No influence, the code isn't run at all
    # typeset -a VLIST_NONSELECTABLE_ELEMENTS
    if [ ! -z "$VLIST_SEARCH_BUFFER" ]; then
        [ "$#VLIST_NONSELECTABLE_ELEMENTS" -gt 0 ] && for i
("${(nO)VLIST_NONSELECTABLE_ELEMENTS[@]}") list[$i]=()
    fi

done

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-28 16:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-28  6:39 Zsh will not parse an autoload function when it has short loops Sebastian Gniazdowski
2015-08-28  6:43 ` Mikael Magnusson
2015-08-28 16:29   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).