Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: param expansion flags
- X-seq: zsh-users 8789
- From: Haakon Riiser <haakon.riiser@xxxxxxxxxx>
- To: Dominic Mitchell <dom@xxxxxxxxxxxxxxxx>
- Subject: Re: param expansion flags
- Date: Fri, 6 May 2005 18:13:40 +0200
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20050506124817.GA81248@xxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050506124817.GA81248@xxxxxxxxxxxxxxxxxxxx>
Dominic,
> I've gotten part of the way there, but I can't figure out the rest. So
> far, I've gotten it to split out the lines, remove "rake " from the
> front and start putting the initial square bracket in.
>
> % arr=( ${${${(f)~~"$(rake -sT)"}#rake }/ *# /[} )
>
> Can anyone offer me some advice?
This seems to work:
arr=(${^${${${(f)~~"$(rake -sT)"}}#rake }// *# /[}}])
The only difference is that your expression is now placed into
${^...} so that the trailing ] is appended to every line.
--
Haakon
Messages sorted by:
Reverse Date,
Date,
Thread,
Author