Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Local arrays
- X-seq: zsh-users 17633
- From: "Atte Peltomäki" <atte.peltomaki@xxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Local arrays
- Date: Wed, 6 Feb 2013 17:41:08 +0200
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi,
Can someone explain the following behaviour in declaring local arrays?
% F () { local -a foo=(one two three); echo $foo ; }
% F
F: unknown file attribute
% F () { local foo=(one two); echo $foo ; }
% F
F: missing end of string
% F () { local foo=(moi hei); echo $foo ; }
% F
F: number expected
% F () { local -a foo; foo=(one two three); echo $foo ; }
% F
one two three
% echo $ZSH_VERSION
4.3.17
--
Atte Peltomäki
atte.peltomaki@xxxxxx <> http://kameli.org
"Your effort to remain what you are is what limits you"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author