From 929fb5bd5b5ecebb6a3619cb4fa8446a3dd14275 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 26 Oct 2015 14:29:29 +0100 Subject: sort by file type --- lr.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lr.c') diff --git a/lr.c b/lr.c index 27adca5..e1a13df 100644 --- a/lr.c +++ b/lr.c @@ -734,6 +734,10 @@ order(const void *a, const void *b) case 'I': CMP(fb->sb.st_ino, fa->sb.st_ino); case 'd': CMP(fa->depth, fb->depth); case 'D': CMP(fb->depth, fa->depth); + case 't': CMP("ZZZZAZZZZZZZZZZZ"[(fa->sb.st_mode >> 12) & 0x0f], + "ZZZZAZZZZZZZZZZZ"[(fb->sb.st_mode >> 12) & 0x0f]); + case 'T': CMP("ZZZZAZZZZZZZZZZZ"[(fb->sb.st_mode >> 12) & 0x0f], + "ZZZZAZZZZZZZZZZZ"[(fa->sb.st_mode >> 12) & 0x0f]); case 'n': STRCMP(fa->fpath, fb->fpath); case 'N': STRCMP(fb->fpath, fa->fpath); default: STRCMP(fa->fpath, fb->fpath); -- cgit 1.4.1