mirror of https://github.com/Hilbis/Hilbish
Compare commits
4 Commits
44cb577a2b
...
aaeb19c164
Author | SHA1 | Date |
---|---|---|
sammyette | aaeb19c164 | |
ShalokShalom | 1e01580d8f | |
sammyette | edbc758c67 | |
sammyette | a24bca3258 |
18
README.md
18
README.md
|
@ -13,19 +13,23 @@
|
|||
<br>
|
||||
|
||||
Hilbish is an extensible shell designed to be highly customizable.
|
||||
It is configured in Lua and provides a good range of features.
|
||||
It aims to be easy to use for anyone but powerful enough for
|
||||
those who need it.
|
||||
|
||||
It is configured in Lua, and provides a good range of features.
|
||||
It aims to be easy to use for anyone, and powerful enough for
|
||||
those who need more.
|
||||
|
||||
The motivation for choosing Lua was that its simpler and better to use
|
||||
than old shell script. It's fine for basic interactive shell uses,
|
||||
but that's the only place Hilbish has shell script; everything else is Lua
|
||||
and aims to be infinitely configurable. If something isn't, open an issue!
|
||||
than old shell scripts. It's fine for basic interactive shell uses,
|
||||
and supports [both Lua and Sh interactively](https://rosettea.github.io/Hilbish/docs/features/runner-mode/).
|
||||
|
||||
That's the only place Hilbish can use traditional shell syntax though;
|
||||
everything else is Lua and aims to be infinitely configurable.
|
||||
|
||||
If something isn't, open an issue!
|
||||
|
||||
# Screenshots
|
||||
<div align="center">
|
||||
<img src="gallery/tab.png">
|
||||
<img src="gallery/pillprompt.png">
|
||||
</div>
|
||||
|
||||
# Getting Hilbish
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
env = {}
|
||||
|
||||
setmetatable(env, {
|
||||
__index = function(_, k)
|
||||
return os.getenv(k)
|
||||
end,
|
||||
__newindex = function(_, k, v)
|
||||
os.setenv(k, tostring(v))
|
||||
end
|
||||
})
|
|
@ -24,6 +24,7 @@ require 'nature.opts'
|
|||
require 'nature.vim'
|
||||
require 'nature.runner'
|
||||
require 'nature.hummingbird'
|
||||
require 'nature.env'
|
||||
|
||||
local shlvl = tonumber(os.getenv 'SHLVL')
|
||||
if shlvl ~= nil then
|
||||
|
@ -32,36 +33,6 @@ else
|
|||
os.setenv('SHLVL', '0')
|
||||
end
|
||||
|
||||
do
|
||||
local virt_G = { }
|
||||
|
||||
setmetatable(_G, {
|
||||
__index = function (_, key)
|
||||
local got_virt = virt_G[key]
|
||||
if got_virt ~= nil then
|
||||
return got_virt
|
||||
end
|
||||
|
||||
if type(key) == 'string' then
|
||||
virt_G[key] = os.getenv(key)
|
||||
end
|
||||
return virt_G[key]
|
||||
end,
|
||||
|
||||
__newindex = function (_, key, value)
|
||||
if type(value) == 'string' then
|
||||
os.setenv(key, value)
|
||||
virt_G[key] = value
|
||||
else
|
||||
if type(virt_G[key]) == 'string' then
|
||||
os.setenv(key, '')
|
||||
end
|
||||
virt_G[key] = value
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
do
|
||||
local startSearchPath = hilbish.userDir.data .. '/hilbish/start/?/init.lua;'
|
||||
.. hilbish.userDir.data .. '/hilbish/start/?.lua'
|
||||
|
|
Loading…
Reference in New Issue