From a3d8f56d78592f82b0946841e35d08ddf24d1a5e Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Sun, 21 Mar 2021 12:41:23 -0400 Subject: [PATCH] feat: preload file, make config more minimal --- .hilbishrc.lua | 10 ---------- preload.lua | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 preload.lua diff --git a/.hilbishrc.lua b/.hilbishrc.lua index c8f0716..53011fc 100644 --- a/.hilbishrc.lua +++ b/.hilbishrc.lua @@ -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 ()) diff --git a/preload.lua b/preload.lua new file mode 100644 index 0000000..76f48eb --- /dev/null +++ b/preload.lua @@ -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)