mirror of
https://github.com/hymkor/lispect.git
synced 2026-09-01 06:46:50 -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
|
executable = value
|
||||||
}
|
}
|
||||||
lisp = lisp.Let(gmnlisp.Variables{
|
lisp = lisp.Let(gmnlisp.Variables{
|
||||||
gmnlisp.NewSymbol("ARGV"): gmnlisp.List(posixArgv...),
|
gmnlisp.NewSymbol("ARGV"): gmnlisp.List(posixArgv...),
|
||||||
gmnlisp.NewSymbol("PROGRAM-NAME"): gmnlisp.String(args[0]),
|
gmnlisp.NewSymbol("*argv*"): gmnlisp.List(posixArgv...),
|
||||||
gmnlisp.NewSymbol("EXECUTABLE-NAME"): gmnlisp.String(executable),
|
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())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
|
|||||||
Reference in New Issue
Block a user