Patch 8.2.0713

15 views
Skip to first unread message

Bram Moolenaar

unread,
May 7, 2020, 12:52:07 PM5/7/20
to vim...@googlegroups.com

Patch 8.2.0713
Problem: The pam_environment file is not recognized.
Solution: Add a filetype pattern for pamenv. (closes #6051)
Files: runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-8.2.0712/runtime/filetype.vim 2020-04-29 23:01:46.317364426 +0200
--- runtime/filetype.vim 2020-05-07 18:49:36.470272234 +0200
***************
*** 1133,1138 ****
--- 1133,1141 ----
" Pam conf
au BufNewFile,BufRead */etc/pam.conf setf pamconf

+ " Pam environment
+ au BufNewFile,BufRead .pam_environment setf pamenv
+
" PApp
au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp

*** ../vim-8.2.0712/src/testdir/test_filetype.vim 2020-04-29 23:01:46.317364426 +0200
--- src/testdir/test_filetype.vim 2020-05-07 18:50:08.066173020 +0200
***************
*** 322,327 ****
--- 322,328 ----
\ 'openroad': ['file.or'],
\ 'ora': ['file.ora'],
\ 'pamconf': ['/etc/pam.conf'],
+ \ 'pamenv': ['/home/user/.pam_environment'],
\ 'papp': ['file.papp', 'file.pxml', 'file.pxsl'],
\ 'pascal': ['file.pas', 'file.dpr'],
\ 'passwd': ['any/etc/passwd', 'any/etc/passwd-', 'any/etc/passwd.edit', 'any/etc/shadow', 'any/etc/shadow-', 'any/etc/shadow.edit', 'any/var/backups/passwd.bak', 'any/var/backups/shadow.bak'],
*** ../vim-8.2.0712/src/version.c 2020-05-07 18:43:40.867365982 +0200
--- src/version.c 2020-05-07 18:50:40.274071632 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 713,
/**/

--
hundred-and-one symptoms of being an internet addict:
64. The remote to the T.V. is missing...and you don't even care.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Marius Gedminas

unread,
May 7, 2020, 4:48:32 PM5/7/20
to Bram Moolenaar, vim...@googlegroups.com
On Thu, May 07, 2020 at 06:52:00PM +0200, Bram Moolenaar wrote:
> Patch 8.2.0713
> Problem: The pam_environment file is not recognized.
> Solution: Add a filetype pattern for pamenv. (closes #6051)
> Files: runtime/filetype.vim, src/testdir/test_filetype.vim
>
>
> *** ../vim-8.2.0712/runtime/filetype.vim 2020-04-29 23:01:46.317364426 +0200
> --- runtime/filetype.vim 2020-05-07 18:49:36.470272234 +0200
> ***************
> *** 1133,1138 ****
> --- 1133,1141 ----
> " Pam conf
> au BufNewFile,BufRead */etc/pam.conf setf pamconf
>
> + " Pam environment
> + au BufNewFile,BufRead .pam_environment setf pamenv
> +

I see no pamenv.vim in runtime/syntax/ or in runtime/filetype/ in
current git master.

Also, /etc/environment and /etc/default/locale use the same format and
could be added to the pattern.

(While at it, /etc/pam.d/*.conf could be added to the pamconf pattern above.)


Marius Gedminas
--
Un*x admins know what they are doing by definition.
-- Bernd Petrovitsch
signature.asc

Bram Moolenaar

unread,
May 8, 2020, 7:34:16 AM5/8/20
to vim...@googlegroups.com, Marius Gedminas

Marius Gedminas wrote:

> On Thu, May 07, 2020 at 06:52:00PM +0200, Bram Moolenaar wrote:
> > Patch 8.2.0713
> > Problem: The pam_environment file is not recognized.
> > Solution: Add a filetype pattern for pamenv. (closes #6051)
> > Files: runtime/filetype.vim, src/testdir/test_filetype.vim
> >
> >
> > *** ../vim-8.2.0712/runtime/filetype.vim 2020-04-29 23:01:46.317364426 +0200
> > --- runtime/filetype.vim 2020-05-07 18:49:36.470272234 +0200
> > ***************
> > *** 1133,1138 ****
> > --- 1133,1141 ----
> > " Pam conf
> > au BufNewFile,BufRead */etc/pam.conf setf pamconf
> >
> > + " Pam environment
> > + au BufNewFile,BufRead .pam_environment setf pamenv
> > +
>
> I see no pamenv.vim in runtime/syntax/ or in runtime/filetype/ in
> current git master.

Right, but the filetype detection works, thus if someone drops a syntax
file in their own runtime directory it works. I assume we'll get a file
to include in the distrubution some day.

Generally, it's fine to detect more file types than we have runtime
files for. The other way around doesn't make much sense.

> Also, /etc/environment and /etc/default/locale use the same format and
> could be added to the pattern.
>
> (While at it, /etc/pam.d/*.conf could be added to the pamconf pattern above.)

Can you suggest a patch?

--
I got a new desk stapler. It broke on the first desk I tried.
Reply all
Reply to author
Forward
0 new messages