From: Arun Prakash Jana Date: Wed, 8 Jan 2020 22:30:28 +0000 (+0530) Subject: Show mime in file details X-Git-Tag: v2.9~63 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5cb39b0db36a4afd30a0578799cd85dc28ed153c;p=nnn.git Show mime in file details --- diff --git a/src/nnn.c b/src/nnn.c index 815d5d9f..a48536e9 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -3090,11 +3090,15 @@ static bool show_stats(const char *fpath, const struct stat *sb) ++p; } - fprintf(fp, " %s", begin); + fprintf(fp, " %s\n ", begin); + + /* Show the file mime type */ + p = get_output(g_buf, CMD_LEN_MAX, "file", FILE_MIME_OPTS, fpath, FALSE); + fprintf(fp, "%s", g_buf); } } - fprintf(fp, "\n\n"); + fprintf(fp, "\n"); fclose(fp); close(fd);