kxr / o-must-gather

oc like tool that works with must-gather rather than OpenShift API
GNU General Public License v3.0
161 stars 73 forks source link

i was able to get omg autocomplete working under ZSH #73

Open evakhoni opened 2 years ago

evakhoni commented 2 years ago

just experimenting, but maybe helpful to others..


autoload -U +X compinit && compinit
autoload -U +X bashcompinit && bashcompinit
_omg_completion() {
    local IFS=$'
'
    COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}"                    COMP_CWORD=$COMP_CWORD                    _OMG_COMPLETE=complete $1 ) )

    return 0
}
complete -o default -F _omg_completion omg

result:

╰─ omg
completion      get             machine-config  projects        version                                     
describe        logs            project         use             whoami