Skip to content

Add code to enable autocomplete so users can copy it #293

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions docs/adguard-vpn-for-linux/autocomplete.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ To enable it, see the bash-completion hint that is shown after installing or upd

![bash-completion hint](https://cdn.adguard-vpn.com/blog/new/6x3djbash-completion-hint.png)

If you didn't enable completions at install and want to do so later, edit your shell configuration (_typically a file like `~/.bashrc`, `~/.zshrc`, etc. which should already exist in your home directory_) and add the following line. You will need to update the path if you chose a different output directory during installation.

```sh
[ -s "/opt/adguardvpn_cli/bash-completion.sh" ] && \. "/opt/adguardvpn_cli/bash-completion.sh"
```

To use the feature, just start typing the command you want and hit the Tab ↹ key — the command will automatically complete with a necessary word or will show a choice of completion options.

![bash-completion locations command](https://cdn.adguard-vpn.com/blog/new/1g4nhVPN-CLI-autocomplete.png)