generate shell completion scripts
to enable cortex shell completion:
add this to ~/.bash_profile (mac) or ~/.bashrc (linux):
source <(cortex completion bash)
note: bash-completion must be installed on your system; example installation instructions:
1) install bash completion:
brew install bash-completion
2) add this to your ~/.bash_profile:
source $(brew --prefix)/etc/bash_completion
3) log out and back in, or close your terminal window and reopen it
1) install bash completion:
apt update && apt install -y bash-completion # you may need sudo
2) open ~/.bashrc and uncomment the bash completion section, or add this:
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then . /etc/bash_completion; fi
3) log out and back in, or close your terminal window and reopen it
source <(cortex completion zsh)
if that failed, you can try adding this line (above the source command you just added):
autoload -Uz compinit && compinit
create a _cortex file in your fpath, for example:
cortex completion zsh > /usr/local/share/zsh/site-functions/_cortex
Note: this will also add the "cx" alias for cortex for convenience
cortex completion SHELL [flags]
-h, --help help for completion