Browse Source

Pre-calculate spawned shell level

master
Arun Prakash Jana 7 years ago
parent
commit
f9a249c4a4
No known key found for this signature in database GPG Key ID: A75979F35C080412
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      nnn.c

+ 1
- 1
nnn.c View File

@@ -411,7 +411,7 @@ spawn(char *file, char *arg1, char *arg2, char *dir, uchar flag)
/* Show a marker (to indicate nnn spawned shell) */
if (flag & SP_MARKER) {
printf("\n +-++-++-+\n | n n n |\n +-++-++-+\n\n");
printf("Shell Level %s\n", getenv("SHLVL"));
printf("Spawned shell level: %d\n", atoi(getenv("SHLVL")) + 1);
}

/* Suppress stdout and stderr */


Loading…
Cancel
Save