summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2019-01-28 23:29:16 +0200
committerDylan Araps <dylan.araps@gmail.com>2019-01-28 23:29:16 +0200
commit4df0a3f40a7b8af54983324d6bda3f73797d3124 (patch)
tree5a8bc03214cadcf5f24ca76830700b37dfa90832
parent59e1905e115890b5c232b09206ba36440be679a0 (diff)
general: Export envar FFF_LEVEL to make programs aware if fff is the parent
-rwxr-xr-xfff5
1 files changed, 5 insertions, 0 deletions
diff --git a/fff b/fff
index 0c16e26..af5c282 100755
--- a/fff
+++ b/fff
@@ -713,6 +713,11 @@ key() {
# Spawn a shell.
"${FFF_KEY_SHELL:=!}")
reset_terminal
+
+ # Make fff aware of how many times it is nested.
+ export FFF_LEVEL
+ ((FFF_LEVEL++))
+
cd "$PWD" && "$SHELL"
setup_terminal
redraw