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

autocomplete: fix instructions for enabling on Ubuntu 18.04 (bionic) #525

Closed
dashohoxha opened this issue Aug 7, 2019 · 6 comments · Fixed by #537
Closed

autocomplete: fix instructions for enabling on Ubuntu 18.04 (bionic) #525

dashohoxha opened this issue Aug 7, 2019 · 6 comments · Fixed by #537
Assignees
Labels
A: docs Area: user documentation (gatsby-theme-iterative) good first issue Good for newcomers type: enhancement Something is not clear, small updates, improvement suggestions

Comments

@dashohoxha
Copy link
Contributor

dashohoxha commented Aug 7, 2019

The instructions for enabling shell autocompletion in bash are not complete (https://dvc.org/doc/user-guide/autocomplete). It only says:

On a current Linux OS (in a non-minimal installation), bash completion should be available;

This is true, but I also had to enable it by commenting out these lines on ~/.bashrc:

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
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

I am actually using LinuxMint 19, but it is based on Ubuntu 18.04, so this behavior should be the same for all the bionic systems (Ubuntu 18.04 and all the variations based on it).

@shcheklein
Copy link
Member

@dashohoxha is there an official link that describes the process, so that we can just include it instead of duplicating this info?

@shcheklein shcheklein added A: docs Area: user documentation (gatsby-theme-iterative) type: enhancement Something is not clear, small updates, improvement suggestions good first issue Good for newcomers user-guide labels Aug 7, 2019
@shcheklein shcheklein changed the title Fix instructions for enabling shell autocomplete on Ubuntu 18.04 (bionic) autocomplete: fix instructions for enabling on Ubuntu 18.04 (bionic) Aug 7, 2019
@shcheklein
Copy link
Member

@dashohoxha is it different from other systems? previous versions of Ubuntu? other Linux systems?

@dashohoxha
Copy link
Contributor Author

is there an official link that describes the process, so that we can just include it instead of duplicating this info?

There are lots of blogs that describe it (for example this one: https://linuxhandbook.com/enable-tab-completion/), but no official docs that I am aware of, or that I could find.

is it different from other systems? previous versions of Ubuntu? other Linux systems?

I am not sure. The only safe way to find it out is to make a fresh installation of other versions/systems and to check it.
Some issues (like this one: https://ubuntuforums.org/showthread.php?t=2393044) may indicate that it has changed in the latest version of ubuntu, and it was enabled by default on previous versions. But it may also be that the user has enabled it on the previous version and forgot about it.

I have a raspbian system based on debian stretch, and it seems that there it is enabled by default. But I haven't checked it yet on debian buster. I will let you know about this later.

@shcheklein
Copy link
Member

@dashohoxha yep, thanks for the research. It definitely makes sense to put a note with a link to some of these blogs or discussions if it's common across all new Ubuntus.

@dashohoxha
Copy link
Contributor Author

I have a raspbian system based on debian stretch, and it seems that there it is enabled by default. But I haven't checked it yet on debian buster. I will let you know about this later.

It seems that bash autocomplete is enabled by default on debian buster as well, and also on ubuntu bionic etc. I don't know how I got the impression that it has to be enabled manually.
So, the current documentation is correct, after all. Sorry for the confusion.

Sometimes it may not be working out of the box (for different reasons), and knowing how to fix it manually can be useful. To cover this case we can add a expanding note with a link to this blog: https://linuxhandbook.com/enable-tab-completion/ It seems to be a stable blog site and if ever it disappears, some users may notice and report it, and we can switch to some other blog post.

Can I add this note on the page?

@shcheklein
Copy link
Member

@dashohoxha absolutely! a note with a brief comment can be useful and save some people time.

shcheklein added a commit that referenced this issue Aug 10, 2019
Fix: #525: How to fix autocomplete on debian/ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: docs Area: user documentation (gatsby-theme-iterative) good first issue Good for newcomers type: enhancement Something is not clear, small updates, improvement suggestions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants