mirror of
https://github.com/jarun/nnn.git
synced 2025-03-18 20:39:45 +00:00
Update man page on executing commands directly.
Remove extra static string.
This commit is contained in:
parent
577d8d9bfc
commit
3004694cd4
2 changed files with 13 additions and 4 deletions
10
nnn.1
10
nnn.1
|
@ -188,6 +188,16 @@ when dealing with the !, e and p commands respectively. A single combination to
|
||||||
|
|
||||||
NOTE: To run a plugin directly, press \fI:\fR followed by the plugin key.
|
NOTE: To run a plugin directly, press \fI:\fR followed by the plugin key.
|
||||||
.Ed
|
.Ed
|
||||||
|
.Pp
|
||||||
|
To assign keys to arbitrary non-background cli commands (non-shell-interpreted) and invoke like plugins, add \fI_\fR (underscore) before the command.
|
||||||
|
.Bd -literal
|
||||||
|
export NNN_PLUG='x:_chmod +x $NNN;g:_git log;s:_smplayer $NNN;o:fzopen'
|
||||||
|
|
||||||
|
NOTES:
|
||||||
|
1. Use single quotes for $NNN_PLUG so $NNN is not interpreted
|
||||||
|
2. $NNN should be the last argument (IF you want to pass the hovered file name)
|
||||||
|
3. (Again) add \fI_\fR before the command
|
||||||
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
\fBNNN_USE_EDITOR:\fR use VISUAL (else EDITOR, preferably CLI, fallback vi) to handle text files.
|
\fBNNN_USE_EDITOR:\fR use VISUAL (else EDITOR, preferably CLI, fallback vi) to handle text files.
|
||||||
.Bd -literal
|
.Bd -literal
|
||||||
|
|
|
@ -621,12 +621,11 @@ static void xdelay(void)
|
||||||
|
|
||||||
static char confirm_force(bool selection)
|
static char confirm_force(bool selection)
|
||||||
{
|
{
|
||||||
char str[64] = "forcibly remove current file (unrecoverable)? [y/Y confirms]";
|
char str[64];
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
if (selection)
|
snprintf(str, 64, "forcibly remove %s file%s (unrecoverable)? [y/Y confirms]",
|
||||||
snprintf(str, 64, "forcibly remove %d file(s) (unrecoverable)? [y/Y confirms]", nselected);
|
(selection ? xitoa(nselected) : "current"), (selection ? "(s)" : ""));
|
||||||
|
|
||||||
r = get_input(str);
|
r = get_input(str);
|
||||||
|
|
||||||
if (r == 'y' || r == 'Y')
|
if (r == 'y' || r == 'Y')
|
||||||
|
|
Loading…
Add table
Reference in a new issue