mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Preserve attributes on duplicate, update docs
This commit is contained in:
parent
bb5ef221b3
commit
c3ce5bc705
|
@ -214,7 +214,7 @@ optional args:
|
||||||
-a use access time
|
-a use access time
|
||||||
-b key open bookmark key
|
-b key open bookmark key
|
||||||
-d detail mode
|
-d detail mode
|
||||||
-f run filter as cmd on ^P
|
-f run filter as cmd on prompt key
|
||||||
-H show hidden files
|
-H show hidden files
|
||||||
-i nav-as-you-type mode
|
-i nav-as-you-type mode
|
||||||
-n version sort
|
-n version sort
|
||||||
|
|
4
nnn.1
4
nnn.1
|
@ -48,7 +48,7 @@ supports the following options:
|
||||||
detail mode
|
detail mode
|
||||||
.Pp
|
.Pp
|
||||||
.Fl f
|
.Fl f
|
||||||
run filter as command when ^P is pressed
|
run filter as command when the prompt key is pressed
|
||||||
.Pp
|
.Pp
|
||||||
.Fl H
|
.Fl H
|
||||||
show hidden files
|
show hidden files
|
||||||
|
@ -120,7 +120,7 @@ with a '^' (caret) symbol.
|
||||||
.Pp
|
.Pp
|
||||||
There is a program option to filter entries by substring match instead of regex.
|
There is a program option to filter entries by substring match instead of regex.
|
||||||
.Pp
|
.Pp
|
||||||
There is a program option to execute the current filter as a command when \fI^P\fR is pressed.
|
There is a program option to execute the current filter as a command when the prompt key is pressed.
|
||||||
.Pp
|
.Pp
|
||||||
In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
|
In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
|
||||||
allowing continuous navigation. Works best with the \fBarrow keys\fR.
|
allowing continuous navigation. Works best with the \fBarrow keys\fR.
|
||||||
|
|
|
@ -151,6 +151,7 @@
|
||||||
#define F_NORMAL 0x08 /* spawn child process in non-curses regular CLI mode */
|
#define F_NORMAL 0x08 /* spawn child process in non-curses regular CLI mode */
|
||||||
#define F_CMD 0x10 /* run command - show results before exit (must have F_NORMAL) */
|
#define F_CMD 0x10 /* run command - show results before exit (must have F_NORMAL) */
|
||||||
#define F_CLI (F_NORMAL | F_MULTI)
|
#define F_CLI (F_NORMAL | F_MULTI)
|
||||||
|
#define F_SILENT (F_CLI | F_NOTRACE)
|
||||||
|
|
||||||
/* CRC8 macros */
|
/* CRC8 macros */
|
||||||
#define UCHAR_BIT_WIDTH (sizeof(unsigned char) << 3)
|
#define UCHAR_BIT_WIDTH (sizeof(unsigned char) << 3)
|
||||||
|
@ -4279,7 +4280,7 @@ nochange:
|
||||||
if (sel == SEL_RENAME) {
|
if (sel == SEL_RENAME) {
|
||||||
/* Rename the file */
|
/* Rename the file */
|
||||||
if (dup == 'd')
|
if (dup == 'd')
|
||||||
spawn("cp -r", dents[cur].name, tmp, path, F_CLI | F_NOTRACE);
|
spawn("cp -rp", dents[cur].name, tmp, path, F_SILENT);
|
||||||
else if (renameat(fd, dents[cur].name, fd, tmp) != 0) {
|
else if (renameat(fd, dents[cur].name, fd, tmp) != 0) {
|
||||||
close(fd);
|
close(fd);
|
||||||
printwarn(&presel);
|
printwarn(&presel);
|
||||||
|
@ -4535,7 +4536,7 @@ static void usage(void)
|
||||||
" -a use access time\n"
|
" -a use access time\n"
|
||||||
" -b key open bookmark key\n"
|
" -b key open bookmark key\n"
|
||||||
" -d detail mode\n"
|
" -d detail mode\n"
|
||||||
" -f run filter as cmd on ^P\n"
|
" -f run filter as cmd on prompt key\n"
|
||||||
" -H show hidden files\n"
|
" -H show hidden files\n"
|
||||||
" -i nav-as-you-type mode\n"
|
" -i nav-as-you-type mode\n"
|
||||||
" -n version sort\n"
|
" -n version sort\n"
|
||||||
|
|
Loading…
Reference in a new issue