You could read the cookbooks path from the users knife.rb:
CHEF_REPOS = Chef::Config[:cookbook_path]
On Wed, Jan 19, 2011 at 12:47 PM, Avishai Ish-Shalom
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
export CHEF_REPOS=( /home/avishai/chef-repo/site-cookbooks
On 01/19/2011 07:22 PM, Gilles Devaux wrote:
Thanks a lot
On Wed, Jan 19, 2011 at 8:41 AM, Avishai Ish-Shalom
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.