mirror of
https://github.com/hymkor/lispect.git
synced 2026-08-27 20:36:34 -04:00
Add *argv*, *program-name*, etc. as replacements for old global variable names
This commit is contained in:
@@ -66,9 +66,12 @@ func RunString(script string, args []string) error {
|
||||
executable = value
|
||||
}
|
||||
lisp = lisp.Let(gmnlisp.Variables{
|
||||
gmnlisp.NewSymbol("ARGV"): gmnlisp.List(posixArgv...),
|
||||
gmnlisp.NewSymbol("PROGRAM-NAME"): gmnlisp.String(args[0]),
|
||||
gmnlisp.NewSymbol("EXECUTABLE-NAME"): gmnlisp.String(executable),
|
||||
gmnlisp.NewSymbol("ARGV"): gmnlisp.List(posixArgv...),
|
||||
gmnlisp.NewSymbol("*argv*"): gmnlisp.List(posixArgv...),
|
||||
gmnlisp.NewSymbol("PROGRAM-NAME"): gmnlisp.String(args[0]),
|
||||
gmnlisp.NewSymbol("*program-name*"): gmnlisp.String(args[0]),
|
||||
gmnlisp.NewSymbol("EXECUTABLE-NAME"): gmnlisp.String(executable),
|
||||
gmnlisp.NewSymbol("*executable-name*"): gmnlisp.String(executable),
|
||||
})
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
Reference in New Issue
Block a user