fix off by one
This commit is contained in:
@@ -65,13 +65,13 @@ class my_edit(Command):
|
|||||||
class smart_shell(Command):
|
class smart_shell(Command):
|
||||||
""":smart_shell
|
""":smart_shell
|
||||||
|
|
||||||
If SHLVL == 1, spawn a new shell in the current directory.
|
If SHLVL == 0, spawn a new shell in the current directory.
|
||||||
If SHLVL > 1, quit ranger (same as pressing 'q').
|
If SHLVL >= 1, quit ranger (same as pressing 'q').
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def execute(self):
|
def execute(self):
|
||||||
shlvl = int(os.environ.get('SHLVL', 1))
|
shlvl = int(os.environ.get('SHLVL', 1))
|
||||||
if shlvl > 1:
|
if shlvl >= 1:
|
||||||
# We're in a nested shell, quit ranger to return to parent shell
|
# We're in a nested shell, quit ranger to return to parent shell
|
||||||
self.fm.execute_console('quit')
|
self.fm.execute_console('quit')
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user