Skip to content

Commit

Permalink
docs: add documentation for oras completion
Browse files Browse the repository at this point in the history
Signed-off-by: Deepesha Burse <deepeshaburse@Deepeshas-MacBook-Air.local>
  • Loading branch information
Deepesha Burse authored and Deepesha Burse committed Aug 7, 2023
1 parent a5f5815 commit 8e85ffb
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/commands/oras_completion.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
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`:

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

0 comments on commit 8e85ffb

Please sign in to comment.