mirror of
https://github.com/jarun/nnn.git
synced 2024-12-01 02:49:44 +00:00
trash dir is ~/.local/trash
This commit is contained in:
parent
62d1ff278f
commit
ff2bfff386
|
@ -393,7 +393,7 @@ The following indicators are used in the detail view:
|
||||||
| `NNN_NO_AUTOSELECT=1` | do not auto-select matching dir in _nav-as-you-type` mode |
|
| `NNN_NO_AUTOSELECT=1` | do not auto-select matching dir in _nav-as-you-type` mode |
|
||||||
| `NNN_RESTRICT_NAV_OPEN=1` | open files on <kbd> ↵</kbd>, not <kbd>→</kbd> or <kbd>l</kbd> |
|
| `NNN_RESTRICT_NAV_OPEN=1` | open files on <kbd> ↵</kbd>, not <kbd>→</kbd> or <kbd>l</kbd> |
|
||||||
| `NNN_RESTRICT_0B=1` | do not open 0-byte files |
|
| `NNN_RESTRICT_0B=1` | do not open 0-byte files |
|
||||||
| `NNN_TRASH=1` | move files to `~/.local/share/nnn/trash` on delete |
|
| `NNN_TRASH=1` | move files to `~/.local/trash` on delete |
|
||||||
| `NNN_CP_MV_PROG=1` | show copy, move progress on Linux |
|
| `NNN_CP_MV_PROG=1` | show copy, move progress on Linux |
|
||||||
|
|
||||||
#### Help
|
#### Help
|
||||||
|
|
2
nnn.1
2
nnn.1
|
@ -348,7 +348,7 @@ files.
|
||||||
export NNN_RESTRICT_0B=1
|
export NNN_RESTRICT_0B=1
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
\fBNNN_TRASH:\fR move files to \fB~/.local/share/nnn/trash\fR on delete.
|
\fBNNN_TRASH:\fR move files to \fB~/.local/trash\fR on delete.
|
||||||
.Bd -literal
|
.Bd -literal
|
||||||
export NNN_TRASH=1
|
export NNN_TRASH=1
|
||||||
.Ed
|
.Ed
|
||||||
|
|
|
@ -4125,13 +4125,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
/* Create trash dir if missing */
|
/* Create trash dir if missing */
|
||||||
g_tmpfplen = xstrlcpy(g_trash, home, PATH_MAX);
|
g_tmpfplen = xstrlcpy(g_trash, home, PATH_MAX);
|
||||||
g_tmpfplen += xstrlcpy(g_trash + g_tmpfplen - 1,
|
xstrlcpy(g_trash + g_tmpfplen - 1, "/.local/trash", PATH_MAX - g_tmpfplen);
|
||||||
"/.local/share/nnn", PATH_MAX - g_tmpfplen);
|
|
||||||
DPRINTF_S(g_trash);
|
|
||||||
if (!createdir(g_trash, 0777))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
xstrlcpy(g_trash + g_tmpfplen - 2, "/trash", PATH_MAX - g_tmpfplen);
|
|
||||||
DPRINTF_S(g_trash);
|
DPRINTF_S(g_trash);
|
||||||
if (!createdir(g_trash, 0777))
|
if (!createdir(g_trash, 0777))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue