mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
some changes
This commit is contained in:
parent
357a60fbff
commit
38c07b1772
8 changed files with 14 additions and 12 deletions
|
@ -293,7 +293,7 @@ def main(args=None):
|
|||
if args is None:
|
||||
args = sys.argv
|
||||
for pkg in args[1:]:
|
||||
print('amalgamating ' + pkg)
|
||||
print('Amalgamating ' + pkg)
|
||||
exclude = read_exclude(pkg)
|
||||
print(' excluding {}'.format(pprint.pformat(exclude)))
|
||||
graph = make_graph(pkg, exclude=exclude)
|
||||
|
|
4
setup.py
4
setup.py
|
@ -35,7 +35,7 @@ except ImportError:
|
|||
|
||||
from xonsh import __version__ as XONSH_VERSION
|
||||
|
||||
TABLES = ['xonsh/lexer_table.py', 'xonsh/parser_table.py']
|
||||
TABLES = ['xonsh/lexer_table.py', 'xonsh/parser_table.py', 'xonsh/__amalgam__.py']
|
||||
|
||||
|
||||
def clean_tables():
|
||||
|
@ -53,6 +53,8 @@ def build_tables():
|
|||
from xonsh.parser import Parser
|
||||
Parser(lexer_table='lexer_table', yacc_table='parser_table',
|
||||
outputdir='xonsh')
|
||||
import amalgamate
|
||||
amalgamate.main(['amalgamate', 'xonsh'])
|
||||
sys.path.pop(0)
|
||||
|
||||
|
||||
|
|
|
@ -12,17 +12,17 @@ from xonsh.dirstack import cd, pushd, popd, dirs, _get_cwd
|
|||
from xonsh.environ import locate_binary
|
||||
from xonsh.foreign_shells import foreign_shell_data
|
||||
from xonsh.jobs import jobs, fg, bg, clean_jobs
|
||||
from xonsh.history import main as history_alias
|
||||
from xonsh.history import history_main
|
||||
from xonsh.platform import ON_ANACONDA, ON_DARWIN, ON_WINDOWS, scandir
|
||||
from xonsh.proc import foreground
|
||||
from xonsh.replay import main as replay_main
|
||||
from xonsh.replay import replay_main
|
||||
from xonsh.timings import timeit_alias
|
||||
from xonsh.tools import (XonshError, argvquote, escape_windows_cmd_string,
|
||||
to_bool)
|
||||
from xonsh.vox import Vox
|
||||
from xonsh.xontribs import main as xontribs_main
|
||||
from xonsh.xontribs import xontribs_main
|
||||
from xonsh.xoreutils import _which
|
||||
from xonsh.completers._aliases import completer_alias
|
||||
from xonsh.completers._aliases import completer_alias
|
||||
|
||||
|
||||
class Aliases(MutableMapping):
|
||||
|
@ -508,7 +508,7 @@ def make_default_aliases():
|
|||
'source-bash': ['source-foreign', 'bash', '--sourcer=source'],
|
||||
'source-cmd': source_cmd,
|
||||
'source-foreign': source_foreign,
|
||||
'history': history_alias,
|
||||
'history': history_main,
|
||||
'replay': replay_main,
|
||||
'!!': bang_bang,
|
||||
'!n': bang_n,
|
||||
|
|
|
@ -39,7 +39,7 @@ class Execer(object):
|
|||
self.filename = filename
|
||||
self.debug_level = debug_level
|
||||
self.unload = unload
|
||||
self.ctxtransformer = ast.CtxAwareTransformer(self.parser)
|
||||
self.ctxtransformer = CtxAwareTransformer(self.parser)
|
||||
load_builtins(execer=self, config=config, login=login, ctx=xonsh_ctx)
|
||||
|
||||
def __del__(self):
|
||||
|
|
|
@ -455,7 +455,7 @@ def _main(hist, args):
|
|||
_MAIN_ACTIONS[ns.action](ns, hist)
|
||||
|
||||
|
||||
def main(args=None, stdin=None):
|
||||
def history_main(args=None, stdin=None):
|
||||
"""This is the history command entry point."""
|
||||
_ = stdin
|
||||
_main(builtins.__xonsh_history__, args) # pylint: disable=no-member
|
||||
|
|
|
@ -113,7 +113,7 @@ def _main_action(ns, h=None):
|
|||
history_info(ns, hist)
|
||||
|
||||
|
||||
def main(args, stdin=None):
|
||||
def replay_main(args, stdin=None):
|
||||
"""Acts as main function for replaying a xonsh history file."""
|
||||
parser = _create_parser()
|
||||
ns = parser.parse_args(args)
|
||||
|
|
|
@ -507,7 +507,7 @@ def detect_encoding(readline):
|
|||
return default, [first, second]
|
||||
|
||||
|
||||
def open(filename):
|
||||
def _tokopen(filename):
|
||||
"""Open a file in read only mode using the encoding detected by
|
||||
detect_encoding().
|
||||
"""
|
||||
|
|
|
@ -129,7 +129,7 @@ _MAIN_ACTIONS = {
|
|||
'list': _list,
|
||||
}
|
||||
|
||||
def main(args=None, stdin=None):
|
||||
def xontribs_main(args=None, stdin=None):
|
||||
"""Alias that loads xontribs"""
|
||||
if not args or (args[0] not in _MAIN_ACTIONS and
|
||||
args[0] not in {'-h', '--help'}):
|
||||
|
|
Loading…
Add table
Reference in a new issue