Hi James Hi Bram
On 2015-08-02 Sunday at 22:32 +0200 Bram Moolenaar wrote: > James McCoy wrote: > > Attached patch adds support for recognizing various locations of bash > > completion files. The commonly supported locations are > > ~/.bash_completion, $XDG_CONFIG_HOME/bash_completion, > > /etc/bash_completion, and /etc/bash_completion.d/$command. > Thanks! On Gentoo I have /etc/bash_completion.d/* /etc/profile.d/bash-completion.sh /usr/share/bash-completion/* I enhanced the patch to cover these paths additionally to those mentioned by James, and to cover thinkable variations. Please find it attached. Thanks to James for taking the initiative. Some day I can remove regarding code from my /etc/vim/vimrc file … :) Regarding pattern “*.ebuild”: I added pattern “*.eclass”. It regards to files providing shell code common to multiple Gentoo ebuilds with the goal to avoid duplication of code. -- Best regards, Roland Eggner -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1858,7 +1858,7 @@
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
" Gentoo ebuilds are actually bash scripts
-au BufNewFile,BufRead
.bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,.bash_aliases*,*.bash,*.ebuild
call SetFileTypeSH("bash")
+au BufNewFile,BufRead
.bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass
call SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call
SetFileTypeSH(getline(1))
pgp4T2UfsZujQ.pgp
Description: PGP signature
