瀏覽代碼

Late get and set NNNLVL before spawning shell

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

+ 5
- 4
src/nnn.c 查看文件

@@ -5913,6 +5913,10 @@ nochange:


switch (sel) { switch (sel) {
case SEL_SHELL: case SEL_SHELL:
/* Set nnn nesting level */
tmp = getenv(env_cfg[NNNLVL]);
setenv(env_cfg[NNNLVL], xitoa((tmp ? atoi(tmp) : 0) + 1), 1);

setenv(envs[ENV_NCUR], (ndents ? dents[cur].name : ""), 1); setenv(envs[ENV_NCUR], (ndents ? dents[cur].name : ""), 1);
spawn(shell, NULL, NULL, path, F_CLI); spawn(shell, NULL, NULL, path, F_CLI);
break; break;
@@ -6710,10 +6714,7 @@ int main(int argc, char *argv[])
} }
#endif #endif


/* Set nnn nesting level */ /* Configure trash preference */
arg = getenv(env_cfg[NNNLVL]);
setenv(env_cfg[NNNLVL], xitoa((arg ? atoi(arg) : 0) + 1), 1);

if (xgetenv_set(env_cfg[NNN_TRASH])) if (xgetenv_set(env_cfg[NNN_TRASH]))
cfg.trash = 1; cfg.trash = 1;




||||||
x
 
000:0
Loading…
取消
儲存