Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
(s,:,) made right ("" is also an element)
- X-seq: zsh-users 19999
- From: Marc Chantreux <khatar@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: (s,:,) made right ("" is also an element)
- Date: Fri, 13 Mar 2015 11:12:08 +0100
- 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
hello, 
say i have
    PATH="/usr/bin::/bin" 
    print -l ${(s,:,)PATH}
    foo=( ${(s,:,)PATH} )
    print $#foo
because i have an empty element (which is also an element)
i got
    /usr/bin
    /bin
    2
i expect
    /usr/bin
    /bin
    3 
does someone know how to fix zsh?
regards 
-- 
Marc Chantreux (eiro on github and freenode)
http://eiro.github.com/
http://eiro.github.com/atom.xml
"Don't believe everything you read on the Internet"
    -- Abraham Lincoln
Messages sorted by:
Reverse Date,
Date,
Thread,
Author