Re: CF CLI v6.25.0 Released Today

James Bayer

congrats on the new release dies and team. tab completion is a nice touch.

On Tue, Feb 28, 2017 at 2:16 PM, Matt Cholick <cholick(a)> wrote:

Dr Nic,
For me, it was gcp sdk's auto completion that breaks the above stack
overflow post instructions. I added the following to my .zshrc *before*
gcp's auto completion loads:

_cf-cli() {
# All arguments except the first one
# Only split on newlines
local IFS=$'\n'
# Call completion (note that the first element of COMP_WORDS is
# the executable itself)
return 0
autoload -U +X compinit && compinit
autoload -U +X bashcompinit && bashcompinit
function compinit() {}
function bashcompinit() {}
complete -F _cf-cli cf

Which let both the gcloud and the cf work. The lines in gcp's sdk file
that break things are:
autoload -Uz compinit bashcompinit

I did my cf code first and then redefine compinit / bashcomptinit to
no-ops since I already loaded them. I'm sure there are more elegant
solutions, but I don't want to fiddle with the gcloud distributed file


Thank you,

James Bayer

Join { to automatically receive all group messages.