- From: Michael Hale <
>
- To: chef <
>
- Subject: [chef] Re: Re: Re: Knife bash completion
- Date: Wed, 19 Jan 2011 14:19:44 -0500
You could read the cookbooks path from the users knife.rb:
Chef::Knife.new.configure_chef
CHEF_REPOS = Chef::Config[:cookbook_path]
On Wed, Jan 19, 2011 at 12:47 PM, Avishai Ish-Shalom
<
>
wrote:
>
Thanks.
>
>
One thing I forgot to mention is the CHEF_REPOS variable. If you want
>
completion for your cookbooks on the `knife cookbook upload` command set
>
this variable as an array pointing to your chef cookbook directories
>
like so:
>
>
export CHEF_REPOS=( /home/avishai/chef-repo/site-cookbooks
>
/home/avishai/chef-repo/cookbooks )
>
>
Regards,
>
Avishai
>
>
>
On 01/19/2011 07:22 PM, Gilles Devaux wrote:
>
> You Rock!
>
>
>
> Thanks a lot
>
>
>
> On Wed, Jan 19, 2011 at 8:41 AM, Avishai Ish-Shalom
>
> <
>
>
> wrote:
>
>> Attached is a bash completion script for knife. 1st level command
>
>> completion is fast (and hardcoded), nth level is read from `knife sub
>
>> command --help` so it's a little slow.
>
>>
>
>> If anyone feels like adding feature, please do.
>
>>
>
>> --
>
>> Regards,
>
>> Avishai Ish-Shalom
>
>>
>
>>
>
>
Archive powered by MHonArc 2.6.16.