filetype: Depends on non-POSIX file(1) options
lanodan opened this issue · comments
Command used in filetype.lua
: file -bL --mime-type -- '%s'
As usual, POSIX doesn't have long options on file(1)
and sadly there isn't an equivalent option in POSIX (-i
in POSIX is for something entirely different btw), the other options are also absent.
That said https://www.darwinsys.com/file/ is basically the de-facto implementation of file(1)
on libre unixes (OpenBSD seems to have forked it some years ago) so it's not a big issue but I think it should be noted for packagers.
An annoying part is that popen doesn't seems to allow checking the return value, so if you ended up replacing darwinsys's file(1) with plan9port's file(1) you get a broken vis, I think it should check if the output seems like a correct mime type.
Are there any real platforms (real platforms doesn’t include Plan 9 ;)), which doesn’t have darwinsys’s file(1)
? Is this actually an issue?
So, is this an issue at all? This is supposed to be an issue tracker not just a place to contemplate mysteries of life.