瀏覽代碼

trash dir is ~/.local/trash

master
Arun Prakash Jana 5 年之前
父節點
當前提交
ff2bfff386
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: A75979F35C080412
共有 3 個檔案被更改,包括 3 行新增9 行删除
  1. +1
    -1
      README.md
  2. +1
    -1
      nnn.1
  3. +1
    -7
      src/nnn.c

+ 1
- 1
README.md 查看文件

@@ -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


+ 1
- 1
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


+ 1
- 7
src/nnn.c 查看文件

@@ -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…
取消
儲存