From 86e579799b3fff5aa181cf0ff843979751a60f19 Mon Sep 17 00:00:00 2001 From: lvgx Date: Mon, 4 May 2020 06:05:13 +0200 Subject: Add an option to print hovered files to a FIFO (#548) * Add an option to print hovered files to a FIFO This adds an env variable, `NNN_FIFO`, that can be set to a path that `nnn` will open/create as a FIFO, and where every hovered file's path is printed. This allows creating external perview/quick open plugins, ... It can be compiled out with the make variable `O_NOFIFO`. * Check filename ptr instead of full path (for FIFO) * Add documentation to use NNN_FIFO in plugins * Fix path sent to FIFO in empty dirs --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3c0e08a..004c524 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,10 @@ ifeq ($(O_NOBATCH),1) CPPFLAGS += -DNOBATCH endif +ifeq ($(O_NOFIFO),1) + CPPFLAGS += -DNOFIFO +endif + ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1) CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw) LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw) -- cgit v1.2.3-70-g09d2