export 'LF_LEVEL' variable for nested instances

Related #107
This commit is contained in:
Gokcehan committed 2018-07-28 16:52:54 +03:00
1 parent 9234bcd5b8
commit e82cbb820f
2 files changed
+14

No files matched your search

+9
View File
@@ -242,6 +242,15 @@ func (app *app) exportVars() {
os.Setenv("EDITOR", envEditor)
os.Setenv("PAGER", envPager)
os.Setenv("SHELL", envShell)
level, err := strconv.Atoi(envLevel)
if err != nil {
log.Printf("reading lf level: %s", err)
}
level++
os.Setenv("LF_LEVEL", strconv.Itoa(level))
}
func waitKey() error {