feat: preload file, make config more minimal

pull/5/head
TorchedSammy 2021-03-21 12:41:23 -04:00
parent 5c9a117985
commit a3d8f56d78
2 changed files with 11 additions and 10 deletions

View File

@ -1,16 +1,6 @@
-- Default Hilbish config -- 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' 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} ')) prompt(ansikit.text('λ {bold}{cyan}'..os.getenv('USER')..' >{magenta}>{cyan}>{reset} '))
--hook("tab complete", function ()) --hook("tab complete", function ())

11
preload.lua 100644
View File

@ -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)