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

transformations of glob results



hello people,

i wrote a glob result transformation that way:

    l=( /etc/sympa/*/robot.conf(:h:t) )
    l=( listmaster@$^l )
    print ${(j:,:)l}

but i really would like to know if there is a simple, readable way to
write it in one expression. the perl counterpart would be

    join ','
    , map 'listmaster@'.(split "/")[-2]
    , glob "/etc/*/robot.conf"

and i tried variations around

    print ${(j:,:)${(@)listmaster@${(^) /etc/sympa/*/robot.conf(:h:t) }}}

which

    * doesn't work
    * actually looks ugly

any help from a zsh poweruser ?

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