[Bug 851908] New: Tab-completion of environment variables in bash broken
https://bugzilla.novell.com/show_bug.cgi?id=851908 https://bugzilla.novell.com/show_bug.cgi?id=851908#c0 Summary: Tab-completion of environment variables in bash broken Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: Other OS/Version: openSUSE 13.1 Status: NEW Severity: Minor Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: schuetzm@gmx.net QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0 Tab-completion turns any $ into \$, thus making it impossible to tab-complete variable names. Reproducible: Always Steps to Reproduce: 1. enter "echo $PAT" in bash 2. press tab Actual Results: Bash completes to "echo \$PATH" Expected Results: It should complete to "echo $PATH" (used to work in openSUSE 12.3 and before) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c
Xiyuan Liu
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c1
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c2
--- Comment #2 from Marc Schütz
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c3
Ruediger Meier
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c4
--- Comment #4 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c5
--- Comment #5 from Ruediger Meier
Then debug this please or give me more informations like
I've tracked it down, this is the change breaks it:
----------
commit 992b34c839eec01b452571541d889af31e1d2502
Author: root
beside this: why should bash-completion not be installed?
Don't know. Why I should have it? I've never had this installed and it's AFAIK not installed per default. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c6
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c7
--- Comment #7 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c8
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c9
--- Comment #9 from Ruediger Meier
I'll *not* remove that as this will load automatically completions for the commands used. Otherwise this will cause a reopen of bug #821411.
OK but wouldn't it be "completion broken for any command" vs. "missing a few particular completions". IMO adding particular completions should not break other ones. Isn't /usr/share/bash-completion/completions/ already sourced by the bash-completion package? Wouldn't it be ok to require installed bash-completion to source that directory? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c
Swamp Workflow Management
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c10
--- Comment #10 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c11
--- Comment #11 from Dr. Werner Fink
About the colon problem (comment #4). Should I open another bug report or could you just look at it? In comment #4 I was wrong, it's not related to the same function. Touching $HOME/.bash.expert is "fixing" it.
I'm not arware of a colon problem ... and comment #4 is my own comment .. ?
Isn't /usr/share/bash-completion/completions/ already sourced by the bash-completion package? Wouldn't it be ok to require installed bash-completion to source that directory?
No it is not as such would heavily increase the startup time of the bash as there are a huge number of files. Most of them are provided by packages which do provide their own completion for tool in the package. This is perpendicular to the bash-completion package. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c12
--- Comment #12 from Ruediger Meier
(In reply to comment #9)
About the colon problem (comment #4). Should I open another bug report or could you just look at it? In comment #4 I was wrong, it's not related to the same function. Touching $HOME/.bash.expert is "fixing" it.
I'm not arware of a colon problem ... and comment #4 is my own comment .. ?
Sorry, I mean comment #5: [...] not completing paths after ":", like this: PATH=/usr/bin:/usr/lo<TAB> which is also very annoying for rsync etc.
Isn't /usr/share/bash-completion/completions/ already sourced by the bash-completion package? Wouldn't it be ok to require installed bash-completion to source that directory?
No it is not as such would heavily increase the startup time of the bash as there are a huge number of files. Most of them are provided by packages which do provide their own completion for tool in the package. This is perpendicular to the bash-completion package.
I understand but I'm missing an easy way to prevent other unrelated packages from changing my bash setup. The $HOME/.bash.expert solution is to much and also does not work globally for all users. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c13
--- Comment #13 from Dr. Werner Fink
Sorry, I mean comment #5: [...] not completing paths after ":", like this: PATH=/usr/bin:/usr/lo<TAB> which is also very annoying for rsync etc.
This *is* a job for a complete function for rsync as the bash default not the readline default will not do this (AFAIK).
I understand but I'm missing an easy way to prevent other unrelated packages from changing my bash setup. The $HOME/.bash.expert solution is to much and also does not work globally for all users.
Hmmm ... if you want to have plain TAB completion you may add complete -r in ~/.bashrc ... on the other hand if one of the completion below /usr/share/bash-completion/completions/ does bother then run rpm -qf /usr/share/bash-completion/completions/<file> the see the package and open a bug against this package. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c14
--- Comment #14 from Ruediger Meier
[...] not completing paths after ":", like this: PATH=/usr/bin:/usr/lo<TAB> which is also very annoying for rsync etc.
This *is* a job for a complete function for rsync as the bash default not the readline default will not do this (AFAIK).
No it's not rsync related. Colon is a standard path separator in UNIX. It works as expected in default bash setup. It always worked in openSUSE <= 12.3.
... on the other hand if one of the completion below
/usr/share/bash-completion/completions/
does bother then run
rpm -qf /usr/share/bash-completion/completions/<file>
the see the package and open a bug against this package.
It's too much work for me. Since 13.1 I see so many little but annoying problems ... that's why I want to try to get only the basic things fixed here. I was thinking about this since 2 months whether it's worth to start writing bug reports or better to use my own bashrc and profile from scratch (probably getting a lot other kind of problems). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c15
--- Comment #15 from Ruediger Meier
[...] not completing paths after ":", like this: PATH=/usr/bin:/usr/lo<TAB>
Got it. It came with osc diff --git a/profile.d/osc.sh b/profile.d/osc.sh index 6148b40..77156ad 100644 --- a/profile.d/osc.sh +++ b/profile.d/osc.sh @@ -1,6 +1,7 @@ test -z "$BASH_VERSION" && return complete -o default _nullcommand >/dev/null 2>&1 || return complete -r _nullcommand >/dev/null 2>&1 || return +COMP_WORDBREAKS="${COMP_WORDBREAKS//:}" test -s /usr/share/osc/complete && complete -o default -C /usr/share/osc/complete osc test -s /usr/lib64/osc/complete && complete -o default -C /usr/lib64/osc/complete osc test -s /usr/lib/osc/complete && complete -o default -C /usr/lib/osc/complete osc This needs to be reverted. BTW COMP_WORDBREAKS was not even exported, so even more confusing that there was no problem in a subshell. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c16
--- Comment #16 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c17
Adrian Schröter
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c18
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c19
--- Comment #19 from Ruediger Meier
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c20
--- Comment #20 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c21
--- Comment #21 from Ruediger Meier
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c22
--- Comment #22 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c23
--- Comment #23 from Adrian Schröter
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c24
--- Comment #24 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c25
--- Comment #25 from Ruediger Meier
(In reply to comment #23)
Ahmm ... this is the libreadline *before* the completion or a completion script or completion shell function of the bash tries to handle this!
However zsh is able to do it way better. On the other hand colons are still one of the most evil characters for file names. They are IMO even worse than spaces or tabs. For example usually you can't build automake/libtool based tar balls if their absolute path contains a colon. Because such paths can't be used in $PATH or $LD_LIBRARY_PATH etc.. Moreover this is really unlucky because osc working copies usually contain such source tar balls and it would be very natural to untar and build them locally where they are. Another use case would be getbinaries, unrpm, PATH=xyz to try something out quickly. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c26
--- Comment #26 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c27
--- Comment #27 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c28
--- Comment #28 from Swamp Workflow Management
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c29
--- Comment #29 from Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=851908
https://bugzilla.novell.com/show_bug.cgi?id=851908#c30
--- Comment #30 from Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=851908
Swamp Workflow Management
participants (1)
-
bugzilla_noreply@novell.com