aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-06-02 16:48:28 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-06-02 16:50:06 +0530
commit1dbbc45c7843ce28056786c604430a68f67f56ae (patch)
tree6dbe53c8e90f025b60dc9169fb71e22b132f03e9 /src
parent61b4416e088e90b947ac6cbfd4b798f67ac4043c (diff)
downloadnnn-1dbbc45c7843ce28056786c604430a68f67f56ae.tar.gz
Key | to send file path to FIFO
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c12
-rw-r--r--src/nnn.h6
2 files changed, 16 insertions, 2 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 2a432b5..3e6e63a 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4151,13 +4151,16 @@ static void show_help(const char *path)
"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 @@ nochange:
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 a403f29..47e03e4 100644
--- a/src/nnn.h
+++ b/src/nnn.h
@@ -104,6 +104,9 @@ enum action {
SEL_QUITCD,
SEL_QUIT,
SEL_QUITFAIL,
+#ifndef NOFIFO
+ SEL_FIFO,
+#endif
#ifndef NOMOUSE
SEL_CLICK,
#endif
@@ -263,6 +266,9 @@ static struct key bindings[] = {
{ CONTROL('Q'), SEL_QUIT },
/* Quit with an error code */
{ 'Q', SEL_QUITFAIL },
+#ifndef NOFIFO
+ { '|', SEL_FIFO },
+#endif
#ifndef NOMOUSE
{ KEY_MOUSE, SEL_CLICK },
#endif