mirror of https://github.com/Hilbis/Hilbish
feat: increment $SHLVL (closes #55)
parent
5408e68e19
commit
7e970e9e81
|
@ -5,6 +5,9 @@ local commander = require 'commander'
|
||||||
local bait = require 'bait'
|
local bait = require 'bait'
|
||||||
local old_dir = hilbish.cwd()
|
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
|
-- Builtins
|
||||||
commander.register('cd', function (args)
|
commander.register('cd', function (args)
|
||||||
bait.throw('cd', args)
|
bait.throw('cd', args)
|
||||||
|
|
Loading…
Reference in New Issue