2
2
réplica de https://github.com/Hilbis/Hilbish sincronizado 2025-07-18 16:52:02 +00:00

feat: preload file, make config more minimal

Este cometimento está contido em:
TorchedSammy 2021-03-21 12:41:23 -04:00
ascendente 5c9a117985
cometimento a3d8f56d78
2 ficheiros modificados com 11 adições e 10 eliminações

Ver ficheiro

@ -1,16 +1,6 @@
-- Default Hilbish config
package.path = package.path .. ';./libs/?/init.lua;/usr/share/hilbish/libs/?/init.lua'
fs = require 'fs'
commander = require 'commander'
ansikit = require 'ansikit'
commander.register("cd", function (path)
if #path == 1 then
fs.cd(path[1])
end
end)
prompt(ansikit.text('λ {bold}{cyan}'..os.getenv('USER')..' >{magenta}>{cyan}>{reset} '))
--hook("tab complete", function ())

11
preload.lua Ficheiro normal
Ver ficheiro

@ -0,0 +1,11 @@
-- The preload file initializes everything else for our shell
-- Currently it just adds our builtins
local fs = require 'fs'
local commander = require 'commander'
commander.register('cd', function (path)
if #path == 1 then
fs.cd(path[1])
end
end)