[Rd] overriding built in Rbuildignore values

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Thu Aug 7 22:07:17 CEST 2025


On Thu, 7 Aug 2025 14:11:08 -0500
Dirk Eddelbuettel <edd using debian.org> wrote:

> One suggestion is to use '*.sw[g-p]' to spare .swf files for Flash

On Unix-like systems (and, empirically, on Windows, despite ':help
swap-file' says the dots are replaced), Vim prepends a dot to the name
of the swap file. So how about only matching files that start with a
dot and end with .sw[certain letters]?

grepl(
 '(^|/)[.][^/]+[.]sw[a-p]$',
 c('.swap.file.swp', 'subdir/.swapfile.swn', 'not-a-swapfile.swc'),
 perl = TRUE
)
# [1]  TRUE TRUE FALSE

-- 
Best regards,
Ivan



More information about the R-devel mailing list