mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
update to fix test cases
This commit is contained in:
parent
56e9cb766d
commit
472c1f90cc
3 changed files with 3 additions and 3 deletions
|
@ -111,7 +111,7 @@ class BaseShell(object):
|
|||
super().__init__()
|
||||
self.execer = execer
|
||||
self.ctx = ctx
|
||||
if kwargs['completer']:
|
||||
if kwargs.get('completer', True):
|
||||
self.completer = Completer()
|
||||
self.buffer = []
|
||||
self.need_more_lines = False
|
||||
|
|
|
@ -186,6 +186,7 @@ def premain(argv=None):
|
|||
shell = builtins.__xonsh_shell__ = Shell(**shell_kwargs)
|
||||
from xonsh import imphooks
|
||||
env = builtins.__xonsh_env__
|
||||
env['XONSH_LOGIN'] = shell_kwargs['login']
|
||||
if args.defines is not None:
|
||||
env.update([x.split('=', 1) for x in args.defines])
|
||||
env['XONSH_INTERACTIVE'] = False
|
||||
|
|
|
@ -73,7 +73,7 @@ class Shell(object):
|
|||
rc : list of str, optional
|
||||
Sequence of paths to run control files.
|
||||
"""
|
||||
self.login = kwargs['login']
|
||||
self.login = kwargs.get('login', True)
|
||||
self.stype = shell_type
|
||||
self._init_environ(ctx, config, rc)
|
||||
env = builtins.__xonsh_env__
|
||||
|
@ -125,6 +125,5 @@ class Shell(object):
|
|||
self.ctx = xonshrc_context(rcfiles=rc, execer=self.execer)
|
||||
else:
|
||||
self.ctx = ctx
|
||||
env['XONSH_LOGIN'] = self.login
|
||||
builtins.__xonsh_ctx__ = self.ctx
|
||||
self.ctx['__name__'] = '__main__'
|
||||
|
|
Loading…
Add table
Reference in a new issue