refactor!: remove hilbish.flag

not really that useful
windows-fixes
TorchedSammy 2022-02-26 11:29:20 -04:00
parent 06221e06cd
commit e3a0195eb3
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 0 additions and 19 deletions

19
api.go
View File

@ -14,7 +14,6 @@ import (
"hilbish/util"
"github.com/pborman/getopt"
"github.com/yuin/gopher-lua"
"mvdan.cc/sh/v3/interp"
)
@ -24,7 +23,6 @@ var exports = map[string]lua.LGFunction {
"appendPath": hlappendPath,
"cwd": hlcwd,
"exec": hlexec,
"flag": hlflag,
"multiprompt": hlmlprompt,
"prependPath": hlprependPath,
"prompt": hlprompt,
@ -101,23 +99,6 @@ func hlrun(L *lua.LState) int {
return 1
}
// flag(f)
// Checks if the `f` flag has been passed to Hilbish.
func hlflag(L *lua.LState) int {
flagchar := L.CheckString(1)
flag := getopt.Lookup([]rune(flagchar)[0])
if flag == nil {
L.Push(lua.LNil)
return 1
}
passed := flag.Seen()
L.Push(lua.LBool(passed))
return 1
}
// cwd()
// Returns the current directory of the shell
func hlcwd(L *lua.LState) int {