From 8bc4d723f9e223b61a8d601e3bd1083f31b89322 Mon Sep 17 00:00:00 2001 From: flu0r1ne Date: Wed, 10 May 2023 12:44:09 -0500 Subject: Add instructions for completion --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 35096be..8fd1247 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,18 @@ Then, source the `OPENAI_API_KEY` environmental variable in your shell's configu source ~/.bashrc ``` +#### Bash / Zsh Completion + +`gpt-chat-cli` uses [argcomplete](https://github.com/kislyuk/argcomplete) to generate completion scripts for the `bash` or `zsh` shells. + +Currently, the recommended installation method is the explicit registeration of argcomplete with your shell by placing the following line in your `~/.bashrc` or `~/.zshrc`. + +```bash +eval "$(register-python-argcomplete gpt-chat-cli)" +``` + +Argcomplete also supports registration through ["global completion"](https://github.com/kislyuk/argcomplete#global-completion). The aim of global completion is to automatically register any scripts which use argcomplete. This is not currently recommended as it seems to make some assumptions which do not hold for all users. + ### User Guide #### Basic Usage -- cgit v1.2.3