mirror of https://github.com/Hilbis/Hilbish
feat: preload file, make config more minimal
parent
5c9a117985
commit
a3d8f56d78
|
@ -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 ())
|
||||||
|
|
|
@ -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)
|
Loading…
Reference in New Issue