Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add documentation for oras completion #246

Merged
merged 6 commits into from
Aug 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions docs/commands/oras_completion.mdx
Original file line number Diff line number Diff line change
@@ -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.
deepeshaburse marked this conversation as resolved.
Show resolved Hide resolved

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
```