mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +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_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_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 |
|
||||
|
||||
#### Help
|
||||
|
|
2
nnn.1
2
nnn.1
|
@ -348,7 +348,7 @@ files.
|
|||
export NNN_RESTRICT_0B=1
|
||||
.Ed
|
||||
.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
|
||||
export NNN_TRASH=1
|
||||
.Ed
|
||||
|
|
|
@ -4125,13 +4125,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* Create trash dir if missing */
|
||||
g_tmpfplen = xstrlcpy(g_trash, home, PATH_MAX);
|
||||
g_tmpfplen += xstrlcpy(g_trash + g_tmpfplen - 1,
|
||||
"/.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);
|
||||
xstrlcpy(g_trash + g_tmpfplen - 1, "/.local/trash", PATH_MAX - g_tmpfplen);
|
||||
DPRINTF_S(g_trash);
|
||||
if (!createdir(g_trash, 0777))
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue