mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-06 01:10:57 +01:00
add $ARGS environment variable
This commit is contained in:
parent
901e942641
commit
de275a484d
1 changed files with 1 additions and 0 deletions
|
@ -45,6 +45,7 @@ def main(argv=None):
|
|||
with open(args.file) as f:
|
||||
code = f.read()
|
||||
code = code if code.endswith('\n') else code + '\n'
|
||||
env['ARGS'] = [args.file] + args.args
|
||||
env['0'] = args.file
|
||||
for ix, arg in enumerate(args.args):
|
||||
env[str(ix+1)] = arg
|
||||
|
|
Loading…
Add table
Reference in a new issue