mirror of
https://github.com/jarun/nnn.git
synced 2024-11-17 16:39:14 +00:00
make option O_NOSORT to disable sort on dir load
This commit is contained in:
parent
e140e34483
commit
aa2147f3ef
5
Makefile
5
Makefile
|
@ -27,6 +27,7 @@ O_NOSSN := 0 # disable session support
|
||||||
O_NOUG := 0 # disable user, group name in status bar
|
O_NOUG := 0 # disable user, group name in status bar
|
||||||
O_NOX11 := 0 # disable X11 integration
|
O_NOX11 := 0 # disable X11 integration
|
||||||
O_MATCHFLTR := 0 # allow filters without matches
|
O_MATCHFLTR := 0 # allow filters without matches
|
||||||
|
O_NOSORT := 0 # disable sorting entries on dir load
|
||||||
|
|
||||||
# User patches
|
# User patches
|
||||||
O_GITSTATUS := 0 # add git status to detail view
|
O_GITSTATUS := 0 # add git status to detail view
|
||||||
|
@ -121,6 +122,10 @@ ifeq ($(strip $(O_MATCHFLTR)),1)
|
||||||
CPPFLAGS += -DMATCHFLTR
|
CPPFLAGS += -DMATCHFLTR
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(O_NOSORT)),1)
|
||||||
|
CPPFLAGS += -DNOSORT
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
|
ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
|
||||||
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw)
|
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw)
|
||||||
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw)
|
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw)
|
||||||
|
|
|
@ -5847,7 +5847,9 @@ static void populate(char *path, char *lastname)
|
||||||
if (!ndents)
|
if (!ndents)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifndef NOSORT
|
||||||
ENTSORT(pdents, ndents, entrycmpfn);
|
ENTSORT(pdents, ndents, entrycmpfn);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
clock_gettime(CLOCK_REALTIME, &ts2);
|
clock_gettime(CLOCK_REALTIME, &ts2);
|
||||||
|
|
Loading…
Reference in a new issue