diff --git a/preload.lua b/preload.lua index ccb8b6d..8f5a7ff 100644 --- a/preload.lua +++ b/preload.lua @@ -5,6 +5,9 @@ local commander = require 'commander' local bait = require 'bait' local old_dir = hilbish.cwd() +local shlvl = tonumber(os.getenv 'SHLVL') +if shlvl ~= nil then os.setenv('SHLVL', shlvl + 1) else os.setenv('SHLVL', 1) end + -- Builtins commander.register('cd', function (args) bait.throw('cd', args)