mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
some stuff
This commit is contained in:
parent
2e775ae98a
commit
1c139047d6
2 changed files with 6 additions and 8 deletions
|
@ -21,10 +21,7 @@ INC_ATTRS = (3, 5, 1) <= VER_FULL
|
|||
def xonsh_builtins_autouse(xonsh_builtins):
|
||||
return xonsh_builtins
|
||||
|
||||
PARSER = Parser(lexer_optimize=False, yacc_optimize=False, yacc_debug=True,
|
||||
#lexer_table='lexer_test_table',
|
||||
#yacc_table='parser_test_table'
|
||||
)
|
||||
PARSER = Parser(lexer_optimize=False, yacc_optimize=False, yacc_debug=True)
|
||||
|
||||
|
||||
def check_ast(inp, run=True, mode='eval'):
|
||||
|
|
|
@ -3,7 +3,6 @@ import os
|
|||
import builtins
|
||||
import collections.abc as cabc
|
||||
|
||||
from xonsh.dirstack import _get_cwd
|
||||
from xonsh.platform import ON_WINDOWS
|
||||
from xonsh.tools import executables_in
|
||||
|
||||
|
@ -126,10 +125,12 @@ class CommandsCache(cabc.Mapping):
|
|||
if ON_WINDOWS:
|
||||
# Windows users expect to be able to execute files in the same
|
||||
# directory without `./`
|
||||
local_bin = next((fn for fn in possibilities if os.path.isfile(fn)), None)
|
||||
local_bin = next((fn for fn in possibilities if os.path.isfile(fn)),
|
||||
None)
|
||||
if local_bin:
|
||||
return os.path.abspath(local_bin)
|
||||
cached = next((cmd for cmd in possibilities if cmd in self._cmds_cache), None)
|
||||
return os.path.abspath(local_bin)
|
||||
cached = next((cmd for cmd in possibilities if cmd in self._cmds_cache),
|
||||
None)
|
||||
if cached:
|
||||
return self._cmds_cache[cached][0]
|
||||
elif os.path.isfile(name) and name != os.path.basename(name):
|
||||
|
|
Loading…
Add table
Reference in a new issue