plugins/README.md | 2 +-
src/nnn.c | 12 ++++++++++--
src/nnn.h | 6 ++++++
diff --git a/plugins/README.md b/plugins/README.md
index 4f2a1d443143d6d74482745f2774efb3d2c58a41..72b6d96ba2de3bc16936f982d6b1d2652d56bc83 100644
--- a/plugins/README.md
+++ b/plugins/README.md
@@ -204,7 +204,7 @@ If a `NNN_FIFO` environment variable is set globally (and `-a` is not passed to `nnn`), each `nnn` instance will write to the same FIFO, and a process reading from the pipe will get hovered path from every instance, interleaved.
Don't forget to fork in the background to avoid blocking `nnn`.
-Note that `nnn` does not watch the hovered file and update the path if it's modified while under preview. Press ^L to update the preview without changing the hovered entry.
+Note that `nnn` does not watch the hovered file and update the path if it's modified while under preview. Press | to update the preview without changing the hovered entry.
#### Examples
There are many plugins provided by `nnn` which can be used as examples. Here are a few simple selected examples.
diff --git a/src/nnn.c b/src/nnn.c
index 2a432b5a0ee0e66897cb9ed2ae548086984124ac..3e6e63ad598dc424c27db316de610b25710df19b 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4151,13 +4151,16 @@ "5Space ^J (Un)select%-11cm ^K Mark range/clear\n"
"9p ^P Copy sel here%-11ca Select all\n"
"9v ^V Move sel here%-8cw ^W Cp/mv sel as\n"
"9x ^X Delete%-18cE Edit sel\n"
- "c* Toggle exe%-14c> Export list\n"
+ "c* Toggle exe%-14c> Export list\n"
"1MISC\n"
"8Alt ; Select plugin%-11c= Launch app\n"
"9! ^] Shell%-19c] Cmd prompt\n"
"cc Connect remote%-10cu Unmount\n"
"9t ^T Sort toggles%-12cs Manage session\n"
- "cT Set time type%-11c0 Lock\n"
+ "cT Set time type%-11c0 Lock\n"
+#ifndef NOFIFO
+ "c| Send to FIFO%-0c\n"
+#endif
};
fd = create_tmp_file();
@@ -6492,6 +6495,11 @@ /* Picker mode: reset buffer or clear file */
if (sel == SEL_QUITCD || getenv("NNN_TMPFILE"))
cfg.picker ? selbufpos = 0 : write_lastdir(path);
return sel == SEL_QUITFAIL ? EXIT_FAILURE : EXIT_SUCCESS;
+#ifndef NOFIFO
+ case SEL_FIFO:
+ notify_fifo(TRUE);
+ goto nochange;
+#endif
default:
if (xlines != LINES || xcols != COLS)
continue;
diff --git a/src/nnn.h b/src/nnn.h
index a403f2973b3b76a40136bf2e8251ce5904dc4a55..47e03e41969e31748aaa8b99e224bd3d07575684 100644
--- a/src/nnn.h
+++ b/src/nnn.h
@@ -104,6 +104,9 @@ SEL_QUITCTX,
SEL_QUITCD,
SEL_QUIT,
SEL_QUITFAIL,
+#ifndef NOFIFO
+ SEL_FIFO,
+#endif
#ifndef NOMOUSE
SEL_CLICK,
#endif
@@ -263,6 +266,9 @@ /* Quit */
{ CONTROL('Q'), SEL_QUIT },
/* Quit with an error code */
{ 'Q', SEL_QUITFAIL },
+#ifndef NOFIFO
+ { '|', SEL_FIFO },
+#endif
#ifndef NOMOUSE
{ KEY_MOUSE, SEL_CLICK },
#endif