mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 00:41:00 +01:00
load import hooks in main
This commit is contained in:
parent
08609ca0ca
commit
636f6f61aa
1 changed files with 2 additions and 5 deletions
|
@ -3,10 +3,10 @@ import os
|
|||
import sys
|
||||
import shlex
|
||||
import signal
|
||||
import builtins
|
||||
import subprocess
|
||||
from argparse import ArgumentParser, Namespace
|
||||
|
||||
import builtins
|
||||
from xonsh.shell import Shell
|
||||
|
||||
parser = ArgumentParser(description='xonsh')
|
||||
|
@ -36,13 +36,10 @@ parser.add_argument('args',
|
|||
|
||||
def main(argv=None):
|
||||
"""Main entry point for xonsh cli."""
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
shell = Shell() if not args.norc else Shell(ctx={})
|
||||
|
||||
from xonsh import imphooks
|
||||
env = builtins.__xonsh_env__
|
||||
|
||||
if args.command is not None:
|
||||
# run a single command and exit
|
||||
shell.default(args.command)
|
||||
|
|
Loading…
Add table
Reference in a new issue