mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Merge pull request #204 from breisa/master
Clarify the difference between copy and select
This commit is contained in:
commit
0153e508f5
10
nnn.1
10
nnn.1
|
@ -103,7 +103,7 @@ Toggle selection mode
|
||||||
.It Ic Y
|
.It Ic Y
|
||||||
Select all entries in dir
|
Select all entries in dir
|
||||||
.It Ic Space, ^K
|
.It Ic Space, ^K
|
||||||
Copy entry absolute path
|
Select entry and copy absolute path
|
||||||
.It Ic y
|
.It Ic y
|
||||||
Show selection list
|
Show selection list
|
||||||
.It Ic P
|
.It Ic P
|
||||||
|
@ -254,17 +254,17 @@ In case of only one match and it's a directory, `nnn` auto selects the directory
|
||||||
The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
|
The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
|
||||||
NNN_COPIER is set (see ENVIRONMENT section below).
|
NNN_COPIER is set (see ENVIRONMENT section below).
|
||||||
.Pp
|
.Pp
|
||||||
To copy multiple file paths the selection mode should be enabled using \fI^Y\fR.
|
To select multiple files the selection mode should be enabled using \fI^Y\fR.
|
||||||
In this mode it's possible to
|
In this mode it's possible to
|
||||||
.Pp
|
.Pp
|
||||||
(1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry (works across directories and contexts); or,
|
(1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry (works across directories and contexts); or,
|
||||||
.br
|
.br
|
||||||
(2) navigate to another file in the same directory to select a range of files.
|
(2) navigate to another file in the same directory to select a range of files.
|
||||||
.Pp
|
.Pp
|
||||||
Pressing \fI^Y\fR again copies the paths and exits the selection mode. The files in the list can now
|
Pressing \fI^Y\fR again saves the selection to the list and exits the selection mode.
|
||||||
be copied, moved or removed using respective keyboard shortcuts.
|
The files in the list can now be copied, moved or removed using respective keyboard shortcuts.
|
||||||
.Pp
|
.Pp
|
||||||
To list the file paths copied to memory press \fIy\fR.
|
To list the selected files press \fIy\fR.
|
||||||
.Sh ENVIRONMENT
|
.Sh ENVIRONMENT
|
||||||
The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
|
The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
|
||||||
when dealing with the !, e and p commands respectively. A single combination to arguments is supported for SHELL and PAGER.
|
when dealing with the !, e and p commands respectively. A single combination to arguments is supported for SHELL and PAGER.
|
||||||
|
|
|
@ -3491,7 +3491,8 @@ nochange:
|
||||||
if (copier)
|
if (copier)
|
||||||
spawn(copier, NULL, NULL, NULL, F_NOTRACE);
|
spawn(copier, NULL, NULL, NULL, F_NOTRACE);
|
||||||
}
|
}
|
||||||
printmsg(newpath);
|
mvprintw(LINES - 1, 0, "selected %s%s\n",
|
||||||
|
(!cfg.copymode&&copier) ? "and copied " : "" , newpath);
|
||||||
goto nochange;
|
goto nochange;
|
||||||
case SEL_COPYMUL:
|
case SEL_COPYMUL:
|
||||||
cfg.copymode ^= 1;
|
cfg.copymode ^= 1;
|
||||||
|
@ -3541,7 +3542,7 @@ nochange:
|
||||||
dents[r].name, newpath)))
|
dents[r].name, newpath)))
|
||||||
goto nochange;
|
goto nochange;
|
||||||
|
|
||||||
mvprintw(LINES - 1, 0, "%d files copied\n",
|
mvprintw(LINES - 1, 0, "%d files selected\n",
|
||||||
copyendid - copystartid + 1);
|
copyendid - copystartid + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3552,7 +3553,7 @@ nochange:
|
||||||
spawn(copier, NULL, NULL, NULL, F_NOTRACE);
|
spawn(copier, NULL, NULL, NULL, F_NOTRACE);
|
||||||
|
|
||||||
if (ncp) /* Some files cherry picked */
|
if (ncp) /* Some files cherry picked */
|
||||||
mvprintw(LINES - 1, 0, "%d files copied\n", ncp);
|
mvprintw(LINES - 1, 0, "%d files selected\n", ncp);
|
||||||
} else
|
} else
|
||||||
printmsg("selection off");
|
printmsg("selection off");
|
||||||
goto nochange;
|
goto nochange;
|
||||||
|
|
Loading…
Reference in a new issue