mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 13:51:31 +00:00
Pre-calculate spawned shell level
This commit is contained in:
parent
ae9ee35e0c
commit
f9a249c4a4
2
nnn.c
2
nnn.c
|
@ -411,7 +411,7 @@ spawn(char *file, char *arg1, char *arg2, char *dir, uchar flag)
|
||||||
/* Show a marker (to indicate nnn spawned shell) */
|
/* Show a marker (to indicate nnn spawned shell) */
|
||||||
if (flag & SP_MARKER) {
|
if (flag & SP_MARKER) {
|
||||||
printf("\n +-++-++-+\n | n n n |\n +-++-++-+\n\n");
|
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 */
|
/* Suppress stdout and stderr */
|
||||||
|
|
Loading…
Reference in a new issue