From fe253512faf0b3ecf7415ae4c78aef92ae45d67a Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Sun, 6 Aug 2023 19:22:33 +0100 Subject: [PATCH] readme: add instructions for autocompletion This commit adds instructions in the README file that describe how to enable autocompletion for checkpointctl. Signed-off-by: Radostin Stoyanov --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 582d199f..aaec2b1f 100644 --- a/README.md +++ b/README.md @@ -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.