On Fri, Jun 26, 2015 at 12:40:14PM -0400, Michael Fischer wrote:
Hi.
With 12.3, bash completion generally work(s/ed) for me. However, in 13.2, it does not, unless I modify /usr/share/bash-completion/bash_completion at line 1741 to include `sudo` specifically, AND source it again for each xterm window I open... The file has, at least in theory, been sourced from the chain
/etc/bash.bashrc /etc/profile.d/bash_completion.sh /usr/share/bash-completion/bash_completion
However, I still have to explicitly source it again in the newly-opened xterm to get `sudo` commands to tab-complete (e.g. `sudo ls <TAB>..`)
12.3 seems to have had the pattern:
/etc/bash.bashrc /etc/profile.d/complete.bash
Re-jiggering /etc/bash.bashrc to prefer /etc/profile.d/complete.bash over /etc/profile.d/bash_completion.sh on 13.2 doesn't seem to help.
The only difference I see between the 12.3 and 13.2 versions of complete.bash is the inclusion of the block starting with
if ! type -t _completion_loader &> /dev/null ; then _completion_loader ()
Any explanations?
Suggestions on getting back sudo <CMD> <TAB>... completion?
TIA,
You may try the latest bash-completion from openSUSE Factory or even from the project shells. If you do this then please provide some feedback. Also it might help to use the /etc/profile.d/completion.bash and /etc/bash.bashrc from openSUSE Factory (belongs to package aaa_base or aaa_base-extras) Index: bash-completion.changes =================================================================== --- bash-completion.changes (revision 1) +++ bash-completion.changes (revision 56) @@ -1,4 +1,28 @@ ------------------------------------------------------------------- +Mon Jun 15 08:28:30 UTC 2015 - werner@suse.de + +- Add patch ls-completion-boo889319.patch to make ls completion + more smart (boo#889319) + +------------------------------------------------------------------- +Wed Mar 18 12:45:23 UTC 2015 - werner@suse.de + +- Port my dollar completion from /etc/profile.d/completion.bash to + bash_completion which modifies FOO-dir-completion-boo905348.patch +- Avoid negative cword position counter (boo#922758), this adds + the patch init-completion-boo922758.patch + +------------------------------------------------------------------- +Mon Nov 17 12:46:11 UTC 2014 - werner@suse.de + +- Add patch PS1-completion-boo903362.patch to avoid trouble if + restricted characters of the shell are used in PS1 like + exclamation mark (boo#903362). +- Add patch FOO-dir-completion-boo905348.patch to expand variables + which value is actual a directory to avoid excaped dollar sign + (boo#905348). + +------------------------------------------------------------------- Index: aaa_base.changes [...] +------------------------------------------------------------------- +Fri Dec 5 10:55:09 2014 UTC arvidjaar@gmail.com + +- Avoid sourcing /etc/bash_completion.d twice + Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr