Rosettea / Hilbish

🌓 The Moon-powered shell! A comfy and extensible shell for Lua fans! 🌺 ✨
https://rosettea.github.io/Hilbish/
MIT License
507 stars 22 forks source link

Using Fennel for configuration and shell #204

Closed gasacchi closed 2 years ago

gasacchi commented 2 years ago

Hi, how to configure hilbish with Fennel and also using it as shell command?

TorchedSammy commented 2 years ago

for using it interactively (the mentioned shell commands) you should look into the runner mode feature via the doc runner-mode command. there are some people who have their config in fennel (@Renzix) so you can look as reference when they post it

Renzix commented 2 years ago

https://gitlab.com/renzix/Dotfiles/-/tree/master/.config/hilbish I just use fennel for config and shell for shell by including fennel.lua (it has the entire compiler in a single file which you can download online) and doing

#!/usr/bin/env lua
local fennel = require 'fennel'
fennel.dofile("/home/genzix/.config/hilbish/init.fnl", {compilerEnv = _G})
gasacchi commented 2 years ago

for using it interactively (the mentioned shell commands) you should look into the runner mode feature via the doc runner-mode command. there are some people who have their config in fennel (@Renzix) so you can look as reference when they post it

i will look into it, thanks 😃

https://gitlab.com/renzix/Dotfiles/-/tree/master/.config/hilbish I just use fennel for config and shell for shell by including fennel.lua (it has the entire compiler in a single file which you can download online) and doing

#!/usr/bin/env lua
local fennel = require 'fennel'
fennel.dofile("/home/genzix/.config/hilbish/init.fnl", {compilerEnv = _G})

getting error:

error: /usr/share/hilbish/nature/init.lua:31: #1 must be a string
in function getenv (file [Go])
in function __index (file /usr/share/hilbish/nature/init.lua:31)
in function stablenext (file ./fennel.lua)
in function kvmap (file ./fennel.lua:4736)
in function current_global_names (file ./fennel.lua:750)
in function eval_opts (file ./fennel.lua:5089)
in function eval (file ./fennel.lua:5103)
in function <main chunk> (file /home/gasacchi/.config/hilbish/init.lua:7)
An error has occured while loading your config! Falling back to minimal default config.
Hilbish 2.0 is a major update! If your config doesn't work
anymore, that will definitely be why! A MOTD, very message, much day.

Welcome to Hilbish, gasacchi.
The nice lil shell for Lua fanatics!
TorchedSammy commented 2 years ago

that error is probably from the compiler env but I'm not sure how to fix it; I'll look tomorrow

TorchedSammy commented 2 years ago

did a simple fix so that should work now

TorchedSammy commented 2 years ago

any other error would be due to your fennel config

gasacchi commented 2 years ago

yes, try it just now. working perfectly fine thanks for fast response ❤️