2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-07-06 19:12:02 +00:00

Compare commits

..

No commits in common. "eb630b2de046270b959ee2976afa033e116fb9c9" and "49f2bae9e18f5f910016e1e22cf3c5c657e77edd" have entirely different histories.

4 changed files with 38 additions and 17 deletions

1
api.go
View File

@ -104,6 +104,7 @@ func hilbishLoad(rtm *rt.Runtime) (rt.Value, func()) {
// hilbish.completion table // hilbish.completion table
hshcomp := completionLoader(rtm) hshcomp := completionLoader(rtm)
// TODO: REMOVE "completion" AND ONLY USE "completions" WITH AN S // TODO: REMOVE "completion" AND ONLY USE "completions" WITH AN S
mod.Set(rt.StringValue("completion"), rt.TableValue(hshcomp))
mod.Set(rt.StringValue("completions"), rt.TableValue(hshcomp)) mod.Set(rt.StringValue("completions"), rt.TableValue(hshcomp))
// hilbish.runner table // hilbish.runner table

View File

@ -1,10 +0,0 @@
env = {}
setmetatable(env, {
__index = function(_, k)
return os.getenv(k)
end,
__newindex = function(_, k, v)
os.setenv(k, tostring(v))
end
})

View File

@ -27,7 +27,6 @@ require 'nature.opts'
require 'nature.vim' require 'nature.vim'
require 'nature.runner' require 'nature.runner'
require 'nature.hummingbird' require 'nature.hummingbird'
require 'nature.env'
require 'nature.abbr' require 'nature.abbr'
require 'nature.editor' require 'nature.editor'
@ -38,6 +37,36 @@ else
os.setenv('SHLVL', '0') os.setenv('SHLVL', '0')
end 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 do
local startSearchPath = hilbish.userDir.data .. '/hilbish/start/?/init.lua;' local startSearchPath = hilbish.userDir.data .. '/hilbish/start/?/init.lua;'
.. hilbish.userDir.data .. '/hilbish/start/?.lua' .. hilbish.userDir.data .. '/hilbish/start/?.lua'

View File

@ -11,7 +11,7 @@ var (
// Version info // Version info
var ( var (
ver = "v3.0.0" ver = "v2.4.0"
releaseName = "Moonflower" releaseName = "Moonflower"
gitCommit string gitCommit string
@ -26,3 +26,4 @@ var (
noexecute bool // Should we run Lua or only report syntax errors noexecute bool // Should we run Lua or only report syntax errors
initialized bool initialized bool
) )