diff --git a/docs/commands/oras_completion.mdx b/docs/commands/oras_completion.mdx new file mode 100644 index 00000000..683d6643 --- /dev/null +++ b/docs/commands/oras_completion.mdx @@ -0,0 +1,33 @@ +--- +title: oras completion +sidebar_position: 45 +--- + +# oras completion + +`oras completion` helps to generate the autocompletion script for oras for the specified shell. + +Based on the shell that you use (bash/fish/powershell/zsh), please run: + +``` +oras completion [shell] --help +``` + +This will return an output on how you can set up `oras completion` for your shell. + +For example, the following steps are to be followed to set it up for `zsh` on macOS: + +``` +$ echo "autoload -U compinit; compinit" >> ~/.zshrc +$ source <(oras completion zsh); compdef _oras oras +$ oras completion zsh > $(brew --prefix)/share/zsh/site-functions/_oras +``` + +After setting it up, you can hit `tab` to autocomplete your commands. + +## Options + +``` + -h, --help help for [shell] + --no-descriptions disable completion descriptions +``` \ No newline at end of file