Compare commits

...

3 Commits

Author SHA1 Message Date
TorchedSammy afe579f5be
fix: use correct signature for rl lua loader 2022-01-31 17:46:24 -04:00
TorchedSammy 5d3c129e80
fix: import gopher-lua in other rl impls 2022-01-31 17:45:21 -04:00
TorchedSammy 2bc75c8130
style: tiny style changes/fixes 2022-01-31 17:43:12 -04:00
4 changed files with 9 additions and 4 deletions

View File

@ -173,6 +173,7 @@ func lookpath(file string) error {
return os.ErrNotExist return os.ErrNotExist
} }
func findExecutable(name string) error { func findExecutable(name string) error {
f, err := os.Stat(name) f, err := os.Stat(name)
if err != nil { if err != nil {

View File

@ -3,7 +3,7 @@ local bait = require 'bait'
local commander = require 'commander' local commander = require 'commander'
local fs = require 'fs' local fs = require 'fs'
local lunacolors = require 'lunacolors' local lunacolors = require 'lunacolors'
local _ require 'succulent' -- Function additions local _ = require 'succulent' -- Function additions
local oldDir = hilbish.cwd() local oldDir = hilbish.cwd()
local shlvl = tonumber(os.getenv 'SHLVL') local shlvl = tonumber(os.getenv 'SHLVL')

View File

@ -6,7 +6,10 @@ package main
// making them interchangable during build time // making them interchangable during build time
// this is hilbiline's, as is obvious by the filename // this is hilbiline's, as is obvious by the filename
import "github.com/Rosettea/Hilbiline" import (
"github.com/Rosettea/Hilbiline"
"github.com/yuin/gopher-lua"
)
type lineReader struct { type lineReader struct {
hl *hilbiline.HilbilineState hl *hilbiline.HilbilineState
@ -42,7 +45,7 @@ func (lr *lineReader) Resize() {
} }
// lua module // lua module
func (lr *lineReader) Loader() *lua.LTable { func (lr *lineReader) Loader(L *lua.LState) *lua.LTable {
lrLua := map[string]lua.LGFunction{ lrLua := map[string]lua.LGFunction{
"add": lr.luaAddHistory, "add": lr.luaAddHistory,
"all": lr.luaAllHistory, "all": lr.luaAllHistory,

View File

@ -12,6 +12,7 @@ import (
"fmt" "fmt"
"github.com/maxlandon/readline" "github.com/maxlandon/readline"
"github.com/yuin/gopher-lua"
) )
type lineReader struct { type lineReader struct {
@ -64,7 +65,7 @@ func (lr *lineReader) Resize() {
} }
// lua module // lua module
func (lr *lineReader) Loader() *lua.LTable { func (lr *lineReader) Loader(L *lua.LState) *lua.LTable {
lrLua := map[string]lua.LGFunction{ lrLua := map[string]lua.LGFunction{
"add": lr.luaAddHistory, "add": lr.luaAddHistory,
"all": lr.luaAllHistory, "all": lr.luaAllHistory,