zsh-users
 help / color / mirror / code / Atom feed
* param expansion flags
@ 2005-05-06 12:48 Dominic Mitchell
  2005-05-06 16:11 ` Bart Schaefer
  2005-05-06 16:13 ` Haakon Riiser
  0 siblings, 2 replies; 4+ messages in thread
From: Dominic Mitchell @ 2005-05-06 12:48 UTC (permalink / raw)
  To: zsh-users

I'm trying to write a completion file rake (a make like thing for ruby).
You can get a list of targets like this:

    % rake -sT
    rake apidoc                   # Build the apidoc HTML Files
    rake appdoc                   # Build the appdoc HTML Files
    rake clear_logs               # Clears all *.log files in log/

And I'm trying to get that lot into an array parameter that looks like
this:

    targets=(
        'apidoc[Build the apidoc HTML Files]'
        'appdoc[Build the appdoc HTML Files]'
        'clear_logs[Clears all *.log files in log/]'
    )

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?

-Dom


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-07 10:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-06 12:48 param expansion flags Dominic Mitchell
2005-05-06 16:11 ` Bart Schaefer
2005-05-07 10:16   ` Dominic Mitchell
2005-05-06 16:13 ` Haakon Riiser

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).