From 72da182b4c1d18bf562abde8575e004fe8a4c416 Mon Sep 17 00:00:00 2001 From: Dashamir Hoxha Date: Fri, 9 Aug 2019 09:55:50 +0200 Subject: [PATCH 1/3] How to fix autocomplete on debian/ubuntu Instructions for fixing bash autocomplete on debian/ubuntu. Closes #525 . --- static/docs/user-guide/autocomplete.md | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/static/docs/user-guide/autocomplete.md b/static/docs/user-guide/autocomplete.md index e49dc5c4b6..661342cc5a 100644 --- a/static/docs/user-guide/autocomplete.md +++ b/static/docs/user-guide/autocomplete.md @@ -73,6 +73,36 @@ fi You can `source` your `~/.bash_profile` or launch a new terminal to utilize completion. +
+ +### 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: + ```bash + sudo apt install --reinstall bash-completion + ``` +- Make sure that it is enabled. Edit `~/.bashrc` and make sure that these lines are there: + ```bash + # enable bash completion in interactive shells + if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /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`: + ```bash + source ~/.bashrc + ``` + +For more details see: https://linuxhandbook.com/enable-tab-completion/ + +
+ ## Configure Zsh The DVC specific completion script is located in this path of our main From 3edcd1f314de1c436bb770e7a1e3debbd2deb4aa Mon Sep 17 00:00:00 2001 From: Dashamir Hoxha Date: Sat, 10 Aug 2019 15:20:37 +0200 Subject: [PATCH 2/3] Fix formatting etc. --- static/docs/user-guide/autocomplete.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/static/docs/user-guide/autocomplete.md b/static/docs/user-guide/autocomplete.md index 661342cc5a..dad23892bb 100644 --- a/static/docs/user-guide/autocomplete.md +++ b/static/docs/user-guide/autocomplete.md @@ -77,13 +77,18 @@ completion. ### 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: +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: - ```bash - sudo apt install --reinstall bash-completion + + ```dvc + $ sudo apt install --reinstall bash-completion ``` -- Make sure that it is enabled. Edit `~/.bashrc` and make sure that these lines are there: + +- Make sure that it is enabled. Edit `~/.bashrc` and make sure that these lines + are there: + ```bash # enable bash completion in interactive shells if ! shopt -oq posix; then @@ -94,9 +99,10 @@ As mentioned above, it should work out of the box. But if it does not, try these fi fi ``` + - Exit from the shell and open a new one, or just reload `~/.bashrc`: - ```bash - source ~/.bashrc + ```dvc + $ source ~/.bashrc ``` For more details see: https://linuxhandbook.com/enable-tab-completion/ From e6cd822ce6fe5c9209950e0539663e81df966884 Mon Sep 17 00:00:00 2001 From: Dashamir Hoxha Date: Sat, 10 Aug 2019 17:45:11 +0200 Subject: [PATCH 3/3] Fix missing empty line --- static/docs/user-guide/autocomplete.md | 1 + 1 file changed, 1 insertion(+) diff --git a/static/docs/user-guide/autocomplete.md b/static/docs/user-guide/autocomplete.md index dad23892bb..63cf7dd5e4 100644 --- a/static/docs/user-guide/autocomplete.md +++ b/static/docs/user-guide/autocomplete.md @@ -101,6 +101,7 @@ steps: ``` - Exit from the shell and open a new one, or just reload `~/.bashrc`: + ```dvc $ source ~/.bashrc ```