oci-cli icon indicating copy to clipboard operation
oci-cli copied to clipboard

/Users/atael/lib/oci_autocomplete.sh:12: command not found: complete

Open andytael opened this issue 3 years ago • 1 comments

When adding autocomplete to my .zprofile file:

[[ -e "/Users/atael/lib/oci_autocomplete.sh" ]] && source "/Users/atael/lib/oci_autocomplete.sh"

I get the following error when opening a new terminal window:

/Users/atael/lib/oci_autocomplete.sh:12: command not found: complete

I'm on MacOS 12.4 where zsh is the default shell.

andytael avatar Jul 20 '22 20:07 andytael

oci_autocomplete.sh is specific to bash. So, please add the following lines before sourcing any bash completion files...

autoload -U +X bashcompinit && bashcompinit
autoload -U +X compinit && compinit

pothi avatar Dec 28 '22 05:12 pothi