Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: rake completion
- X-seq: zsh-users 10010
- From: Clint Adams <clint@xxxxxxx>
- To: Dominic Mitchell <dom@xxxxxxxxxxxxxxxx>
- Subject: Re: rake completion
- Date: Fri, 10 Mar 2006 10:13:23 -0500
- Cc: Zsh User <zsh-users@xxxxxxxxxx>
- In-reply-to: <20060309235749.GA80406@xxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Dominic Mitchell <dom@xxxxxxxxxxxxxxxx>, Zsh User <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060309235749.GA80406@xxxxxxxxxxxxxxxxxxxxxx>
> If you're using Rails, this completion for the rake command might come
> in handy:
>
> http://weblog.rubyonrails.com/articles/2006/03/09/fast-rake-task-completion-for-zsh
That could be rewritten to something like the following, but we already
distribute a rake completion function. It would probably be better to
modify that to add caching-layer support and address any other
deficiencies rake users might point out.
#compdef rake
if [[ -f Rakefile ]]; then
if [[ ! -f .rake_tasks ]] || [[ .rake_tasks -ot Rakefile ]]; then
print ${${(f)"$(rake --silent --tasks)"}#* } > .rake_tasks
fi
compadd $(cat .rake_tasks)
fi
Messages sorted by:
Reverse Date,
Date,
Thread,
Author