-
Notifications
You must be signed in to change notification settings - Fork 946
Add documentation for installing rustup completion as non root user #1705
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
Conversation
Strange, this instruction didn't work on my machine. $ bash --version
GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu) |
Hmm, it works for me when I copy and paste the two commands as-is. I tested it on Fedora 29 and Ubuntu 18.04.2 LTS. The bash version on Ubuntu is the same as yours:
Troubleshooting steps:
Also, what OS/Linux distro are you using? |
@ArifRoktim It's my fault for not sourcing It is weird! Last time I used bash interactively, I don't need to source # 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 But in # 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 I'm on Ubuntu 18.04.2 (fresh install). |
@lzutao So I spun up a fresh install of Ubuntu in a VM to see if bash completion works by default. After running the I looked at the default shell config files and at the very end of # 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 took a look at I think in general, bash completion usually "just works" out of the box for most Linux distros. The exact method that the shell uses to enable bash completion is distro specific. Perhaps I should add that users should first check to make sure that completion works for their specific shell? |
☔ The latest upstream changes (presumably #1704) made this pull request unmergeable. Please resolve the merge conflicts. |
Hi @ArifRoktim Would you mind rebasing your change rather than having a PR with merge commits in? I think that if you do that, we should be in a position to merge this pretty soon. Thanks, D. |
☔ The latest upstream changes (presumably #1646) made this pull request unmergeable. Please resolve the merge conflicts. |
The instructions for adding rustup completion for bash as a non root user were missing. Said instructions were already added for the other shells.
Hi @ArifRoktim I merged some changes which put you in need of a rebase again. Since it was in part my fault for taking so long to process your PR I've rebased it for you and think it's good. Could you please check what I've done and if it's good then we'll try and merge your submission :D D. |
I might have already covered this with #1646. If I overshadowed your work, I'm sorry. |
@yodaldevoid @kinnison |
The instructions for adding rustup completion for bash as a non root
user were missing. Said instructions were already added for the other
shells.