Hi, Am 28.05.2015 um 19:32 schrieb Fabian Greffrath: > Am Donnerstag, den 28.05.2015, 18:56 +0200 schrieb Michael Biebl: >> Those lines are commented out by default and all it does is source > > Hm, I must have mistaken this with /etc/skel/.bashrc. :/ > >> /usr/share/bash-completion/bash_completion, not the individual completions. > > But this script, in turn, does source all the files > in /usr/share/bash-completion/completions, or not?
Nope, not afaik. The point of usr/share/bash-completion/completions is, that those are loaded on demand. That's why they need to be named after the calling executable. > Am Donnerstag, den 28.05.2015, 19:17 +0200 schrieb Michael Biebl: >> Looking into this more, I'm not convinced bash_completion is the right >> answer here. After all, it also requires explicit user configuration and >> doesn't actually work if the symlink is in >> /usr/share/bash-completion/bash_completion. It feels like misusing >> bash-completion for something it wasn't designed for. > > Now I am puzzled. It worked for me instantly when I copied the file > to /usr/share/bash-completion/completions and restarted a new > interactive shell. Also, bash-completion might not be the canonical way > to source scripts upon shell startup, but e.g. git does the same for its > branch-aware __git_ps1 prompt. If I copy a simple script to /usr/share/bash-completion/completions which does nothing but "echo foo", I don't get "foo" for interactive shells. If you copy that script to /etc/bash_completion.d/, it is automatically sourced. >> I actually think, the best way to address this, if we want to address >> it, is to revert the upstream change for now and don't require every >> user to change their config until we have found a better solution. > > What upstream change do you actually mean? Re-adding reading /proc to detemine the cwd. I see martin has actually written a nice patch for this, adding it as a fallback. So users can chose to source vte.sh in there .bashrc, if they prefer, then this code wouldn't be used. Otherwise we fallback to the old method. Looks like a good compromise to me. Much better then misusing the bash-completion mechanism. Cheers, Michael [1] https://bugzilla.gnome.org/show_bug.cgi?id=697475#c58 -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature