From e3a0195eb3fc8972d75d3918ec3aa305f8a97a01 Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Sat, 26 Feb 2022 11:29:20 -0400 Subject: [PATCH] refactor!: remove hilbish.flag not really that useful --- api.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/api.go b/api.go index 58730a3..daff18c 100644 --- a/api.go +++ b/api.go @@ -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 {