Skip to content

Commit

Permalink
Add docs on enabling command auto-completion
Browse files Browse the repository at this point in the history
  • Loading branch information
mprpic committed Jul 6, 2023
1 parent 7cf225b commit 9f68276
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,34 @@ Additional options that have an accompanying environment variable include:
before a request is sent to CVE Services. Truthy values for the environment variable are:
`1`, `t`, `yes`.

### Command Autocompletion

Autocompletion of subcommands is supported for the following shells:

#### Bash

Add the following line to your `~/.bashrc` file:

```bash
eval "$(_CVE_COMPLETE=bash_source cve)"
```

#### ZSH

Add the following line to your `~/.zshrc` file:

```bash
eval "$(_CVE_COMPLETE=zsh_source cve)"
```

#### Fish

Add the following line to a `~/.config/fish/completions/cve.fish` file:

```bash
eval (env _CVE_COMPLETE=fish_source cve)
```

## CLI Usage Examples

Available options and commands can be displayed by running `cve --help`. The following are
Expand Down Expand Up @@ -220,6 +248,13 @@ pip install tox
pip install -e .[dev]
```

To enable command autocompletion when using a virtual environment, add the line noted in `Command Autocompletion`
above to your `venv/bin/activate` file, for example:

```bash
echo 'eval "$(_CVE_COMPLETE=bash_source cve)"' >> venv/bin/activate
```

This project uses the [Black](https://black.readthedocs.io) code formatter. To reformat the entire
code base after you make any changes, run:

Expand Down

0 comments on commit 9f68276

Please sign in to comment.