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

readme: add instructions for autocompletion #97

Merged
merged 1 commit into from
Aug 7, 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
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,31 @@ For a complete list of flags supported, use `checkpointctl inspect --help`.
make DESTDIR=/some/new/place install
```

## Enable autocompletion

You now need to ensure that the autocompletion script gets sourced in all your shell sessions.
There are two ways in which you can do this:

### User

```console
echo 'source <(checkpointctl completion bash)' >>~/.bashrc
```

### System

```console
checkpointctl completion bash | sudo tee /etc/bash_completion.d/checkpointctl > /dev/null
sudo chmod a+r /etc/bash_completion.d/checkpointctl
```

Both approaches are equivalent. After reloading your shell, autocompletion should be working.
To enable bash autocompletion in current shell session, source the `~/.bashrc` file:

```console
source ~/.bashrc
```

## Uninstalling

The following command can be used to clean up a previously installed checkpointctl instance.
Expand Down