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

Fix: #525: How to fix autocomplete on debian/ubuntu #537

Merged
merged 3 commits into from
Aug 10, 2019
Merged
Changes from 2 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
36 changes: 36 additions & 0 deletions static/docs/user-guide/autocomplete.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,42 @@ fi
You can `source` your `~/.bash_profile` or launch a new terminal to utilize
completion.

<details>

### Click to expand if it doesn't work on Debian/Ubuntu

As mentioned above, it should work out of the box. But if it does not, try these
steps:

- Make sure that the package `bash-completion` is installed:

```dvc
$ sudo apt install --reinstall bash-completion
```

- Make sure that it is enabled. Edit `~/.bashrc` and make sure that these lines
are there:

```bash
dashohoxha marked this conversation as resolved.
Show resolved Hide resolved
# enable bash completion in interactive shells
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
dashohoxha marked this conversation as resolved.
Show resolved Hide resolved
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
```

- Exit from the shell and open a new one, or just reload `~/.bashrc`:
```dvc
dashohoxha marked this conversation as resolved.
Show resolved Hide resolved
$ source ~/.bashrc
```

For more details see: https://linuxhandbook.com/enable-tab-completion/

</details>

## Configure Zsh

The DVC specific completion script is located in this path of our main
Expand Down