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

removed global completion and added subsections for different shells #8

Merged
merged 2 commits into from
Aug 4, 2024
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
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,14 +631,11 @@ An example of using the client with Microsoft Entra ID (formerly known as Azure
Use the following commands to activate CLI autocompletion for each shell.

### Bash & Zsh
Configure your shell to support global auto completion for python scripts by running:
```shell
activate-global-python-argcomplete
```
Use this command to register `openai` for argument completion using argcomplete for the current terminal session:
```shell
eval "$(register-python-argcomplete openai)"
```
#### Permanent Argument Completion Setup for Bash/Zsh
Alternatively, run this command to register `openai` for argument completion permanently, eliminating the need to run the `eval` command each time the terminal is restarted or killed.
For Bash:
```shell
Expand All @@ -654,6 +651,7 @@ To activate completions for Powershell use:
```shell
register-python-argcomplete --shell powershell openai | Out-String | Invoke-Expression
```
#### Permanent Argument Completion Setup for Powershell
Alternatively, create a new completion file. This command will persist even if the terminal is killed or restarted.
```shell
register-python-argcomplete --shell powershell openai > ~/openai.psm1
Expand All @@ -667,6 +665,7 @@ To activate completions for fish use:
```shell
register-python-argcomplete --shell fish openai | source
```
#### Permanent Argument Completion Setup for Fish
Alternatively, create a new completion file. This command will persist even if the terminal is killed or restarted.
```shell
register-python-argcomplete --shell fish openai > ~/.config/fish/config.fish
Expand Down