Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support per project knife.rb files? #503

Open
pikeas opened this issue May 8, 2017 · 0 comments
Open

Support per project knife.rb files? #503

pikeas opened this issue May 8, 2017 · 0 comments

Comments

@pikeas
Copy link

pikeas commented May 8, 2017

From https://github.com/zsh-users/zsh-completions/blob/master/src/_knife#L221-L223:

_chef_cookbooks_local() {
 (for i in $( grep cookbook_path $HOME/.chef/knife.rb | awk 'BEGIN {FS = "[" }; {print $2}' | sed 's/\,//g' | sed "s/'//g" | sed 's/\(.*\)]/\1/' ); do ls $i; done)
}

This checks for a master knife.rb in the user's home directory. Is there a way to have this completion work more like cd and complete cookbooks / roles / data bags / etc based on current working directory (or relative to first found .chef directory searching through parents)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants