how is extra/bash_completion supposed to work?
installed this packages, but
/etc/bash_completion.d/ stays empty everything is in /usr/share/bash-completion/ and git copmletition in the git doc dir? do I need to copy all files self to /etc/bash_completion.d/ ? could this not be something that just work on Slackware? |
Hi,
I think all you need to do is Code:
# installpkg <path_to_slackware_mount>/extra/bash-completion/bash-completion-2.2-noarch-3.txz |
Quote:
the directory /etc/bash_completion.d/ is for the third-party completion stuff (here it contains the files acroread, libreoffice.sh and youtube-dl.bash-completion). git is a special case as it doesn't install bash completion stuff in the usual places by default: so yes, if you prefer you can copy its git-completion.bash in /etc/bash_completion.d or ~/.config/bash_completion |
This is something seen in other packages as well. Typically /usr/ locations are for upstream or distribution supplied files, and then /etc/ locations are for the user to add over override other files. One of the most common packages you see this with is X (/usr/share/X11/xorg.conf.d/ vs /etc/X11/xorg.conf.d/).
|
2 observations:
1: it does not work for me if I boot to runleven 4, the output of complete -p is totally empty kde terminal, xfce terminal, terminator, but not if I log in on a shell via runlevel 3 or switching to a Ctr+Alt+f1 session. but this login ignores my .bashrc shouldn't a login always run the global profile, why is my x session ignoring that? what is the correct setup? starting each shell as login shell and sourcing .bashrc in .profile? 2: not all software assumes that bash completion is available and puts therefore config files somewhere else. for example git, the useful stuff is in /usr/doc/git-2.9.0/contrib/completion/ this is not good, if I would for example like to add bash completion to sbbdep, I could not assume that bash completion is active and would also have to deliver my completion files in the doc folder? should in 2017 bash completion not be available per default? |
Quote:
Quote:
Quote:
Quote:
if you decide that your completion file for sbbdep has to be available by default to whoever has bash_completion enabled, IMHO, the right place where "make install" has to put it is /usr/share/bash-completion/completions |
thanks, need to write a blog entry for that since I tend to forget from one fresh install to an other.
/etc/profiled.d stuff is invoked also in the various terminals, but all the alias stuff disappears (that's why export -f should be preferred over alias). I am unsure how often I have already learned that now :-) but, the git situations is still less than optimal... edit: and why . /usr/share/bash-completion/bash_completion does this mean this will be ignored/ Code:
ls /etc/bash_completion.d/ |
Quote:
|
decided to source the stuff in .bashrc,
/etc/profile/d/bash_completion.sh and extra some of the aliases of coreutils-dircolors.sh since this will make all terminal applications work out of the box, without customizing the shell command to `bash -l` thanks for the help! |
All times are GMT -5. The time now is 08:31 PM. |