mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 20:01:27 +00:00
Use the -I option on OS X to identify file mime
This commit is contained in:
parent
4b7833ed98
commit
8aa72a40a3
|
@ -331,6 +331,13 @@ static struct timespec gtimeout;
|
||||||
#define REPLACE_STR 'I'
|
#define REPLACE_STR 'I'
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Options to identify file mime */
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#define FILE_OPTS "-bI"
|
||||||
|
#else
|
||||||
|
#define FILE_OPTS "-bi"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macros for utilities */
|
/* Macros for utilities */
|
||||||
#define MEDIAINFO 0
|
#define MEDIAINFO 0
|
||||||
#define EXIFTOOL 1
|
#define EXIFTOOL 1
|
||||||
|
@ -2657,7 +2664,7 @@ nochange:
|
||||||
/* Recognize and open plain
|
/* Recognize and open plain
|
||||||
* text files with vi
|
* text files with vi
|
||||||
*/
|
*/
|
||||||
if (get_output(g_buf, MAX_CMD_LEN, "file", "-bi", newpath, 0) == NULL)
|
if (get_output(g_buf, MAX_CMD_LEN, "file", FILE_OPTS, newpath, 0) == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (strstr(g_buf, "text/") == g_buf) {
|
if (strstr(g_buf, "text/") == g_buf) {
|
||||||
|
|
Loading…
Reference in a new issue