[opensuse] bash completion and sudo
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, Michael -- Michael Fischer michael@visv.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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
On Fri, Jun 26, Dr. Werner Fink wrote:
On Fri, Jun 26, 2015 at 12:40:14PM -0400, Michael Fischer wrote:
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)
Happy to try, but what is the proper way to update these (and only these) packages from Factory, with minimal risk of upsetting the system? TIA, Michael -- Michael Fischer michael@visv.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/26/2015 01:18 PM, Michael Fischer wrote:
On Fri, Jun 26, Dr. Werner Fink wrote:
On Fri, Jun 26, 2015 at 12:40:14PM -0400, Michael Fischer wrote:
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)
Happy to try, but what is the proper way to update these (and only these) packages from Factory, with minimal risk of upsetting the system?
In order for me to get the old bash completion behaviour was to remove two packages. I don't know about this with using sudu, but normal bash completion is borked in 13.2. systemd-bash-completion and bash-completion Everything will work as it did in 12.3 and earlier. Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, Jul 01, Mark Hounschell wrote:
In order for me to get the old bash completion behaviour was to remove two packages. I don't know about this with using sudu, but normal bash completion is borked in 13.2.
systemd-bash-completion and bash-completion
Everything will work as it did in 12.3 and earlier.
Thanks, I'll give that a try later today. Michael -- Michael Fischer michael@visv.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, Jul 02, Michael Fischer wrote:
On Wed, Jul 01, Mark Hounschell wrote:
In order for me to get the old bash completion behaviour was to remove two packages. I don't know about this with using sudu, but normal bash completion is borked in 13.2.
systemd-bash-completion and bash-completion
Everything will work as it did in 12.3 and earlier.
Thanks, I'll give that a try later today.
No luck. Bash still completes paths in "normal" ways, but sudo still gets nothing. Really? No one else having this problem? Michael -- Michael Fischer michael@visv.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Dr. Werner Fink
-
Mark Hounschell
-
Michael Fischer