Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Zsh will not parse an autoload function when it has short loops
- X-seq: zsh-workers 36312
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Zsh will not parse an autoload function when it has short loops
- Date: Fri, 28 Aug 2015 08:39:52 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=8mv33D5G0QjTZm9SnxlLEMsppQgXbuky4jLFhAjSQcI=; b=nLKdMCK7/vnC0tSy4N/VPkoOyo5mStz6/JwV0LpZi/Z1xcaSKCWiv5PXvUhk/IC7WQ kULndc9KtzS+8xCLTW2h2o/+yFKRtcSJgMqy8ee2+BSVXUBwalIVnNspks8logtbHS+D x2g02B5N8OtgYV54ECOjmMGpM9t0X4ZM+FHd+1F47oZNjGKz8Re+wSFIHSkZqx7d/2BY PcGfC57v5fZle4c8BVKvncQEGjNTslgm+At5Dt2DlAyY//N8HWvlTfXh3KCywxc2+Dn3 geHfbGPQ8dDaP115lwiFjUPaNOgcUQOrAUh1L5rx2VEFEwzqCAFzMCugKW/pmezSShOh noWg==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author