mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 20:01:27 +00:00
Key | to send file path to FIFO
This commit is contained in:
parent
61b4416e08
commit
1dbbc45c78
|
@ -204,7 +204,7 @@ If a `NNN_FIFO` environment variable is set globally (and `-a` is not passed to
|
||||||
|
|
||||||
Don't forget to fork in the background to avoid blocking `nnn`.
|
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 <kbd>^L</kbd> 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 <kbd>|</kbd> to update the preview without changing the hovered entry.
|
||||||
|
|
||||||
#### Examples
|
#### Examples
|
||||||
There are many plugins provided by `nnn` which can be used as examples. Here are a few simple selected examples.
|
There are many plugins provided by `nnn` which can be used as examples. Here are a few simple selected examples.
|
||||||
|
|
|
@ -4158,6 +4158,9 @@ static void show_help(const char *path)
|
||||||
"cc Connect remote%-10cu Unmount\n"
|
"cc Connect remote%-10cu Unmount\n"
|
||||||
"9t ^T Sort toggles%-12cs Manage session\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();
|
fd = create_tmp_file();
|
||||||
|
@ -6492,6 +6495,11 @@ nochange:
|
||||||
if (sel == SEL_QUITCD || getenv("NNN_TMPFILE"))
|
if (sel == SEL_QUITCD || getenv("NNN_TMPFILE"))
|
||||||
cfg.picker ? selbufpos = 0 : write_lastdir(path);
|
cfg.picker ? selbufpos = 0 : write_lastdir(path);
|
||||||
return sel == SEL_QUITFAIL ? EXIT_FAILURE : EXIT_SUCCESS;
|
return sel == SEL_QUITFAIL ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||||
|
#ifndef NOFIFO
|
||||||
|
case SEL_FIFO:
|
||||||
|
notify_fifo(TRUE);
|
||||||
|
goto nochange;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
if (xlines != LINES || xcols != COLS)
|
if (xlines != LINES || xcols != COLS)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -104,6 +104,9 @@ enum action {
|
||||||
SEL_QUITCD,
|
SEL_QUITCD,
|
||||||
SEL_QUIT,
|
SEL_QUIT,
|
||||||
SEL_QUITFAIL,
|
SEL_QUITFAIL,
|
||||||
|
#ifndef NOFIFO
|
||||||
|
SEL_FIFO,
|
||||||
|
#endif
|
||||||
#ifndef NOMOUSE
|
#ifndef NOMOUSE
|
||||||
SEL_CLICK,
|
SEL_CLICK,
|
||||||
#endif
|
#endif
|
||||||
|
@ -263,6 +266,9 @@ static struct key bindings[] = {
|
||||||
{ CONTROL('Q'), SEL_QUIT },
|
{ CONTROL('Q'), SEL_QUIT },
|
||||||
/* Quit with an error code */
|
/* Quit with an error code */
|
||||||
{ 'Q', SEL_QUITFAIL },
|
{ 'Q', SEL_QUITFAIL },
|
||||||
|
#ifndef NOFIFO
|
||||||
|
{ '|', SEL_FIFO },
|
||||||
|
#endif
|
||||||
#ifndef NOMOUSE
|
#ifndef NOMOUSE
|
||||||
{ KEY_MOUSE, SEL_CLICK },
|
{ KEY_MOUSE, SEL_CLICK },
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue