mirror of
https://github.com/hymkor/lispect.git
synced 2026-10-27 05:49:57 -04:00
Add *argv*, *program-name*, etc. as replacements for old global variable names
This commit is contained in:
1 parent
e9b766dcdf
commit
ebdc6d7c20
1 file changed
+3
@@ -67,8 +67,11 @@ func RunString(script string, args []string) error {
|
|||||||
}
|
}
|
||||||
lisp = lisp.Let(gmnlisp.Variables{
|
lisp = lisp.Let(gmnlisp.Variables{
|
||||||
gmnlisp.NewSymbol("ARGV"): gmnlisp.List(posixArgv...),
|
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("*program-name*"): gmnlisp.String(args[0]),
|
||||||
gmnlisp.NewSymbol("EXECUTABLE-NAME"): gmnlisp.String(executable),
|
gmnlisp.NewSymbol("EXECUTABLE-NAME"): gmnlisp.String(executable),
|
||||||
|
gmnlisp.NewSymbol("*executable-name*"): gmnlisp.String(executable),
|
||||||
})
|
})
|
||||||
|
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
|
|||||||
Reference in new issue
Block a user