mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
some flake cleanup
This commit is contained in:
parent
5ff0605569
commit
69969988ef
3 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,6 @@ import io
|
|||
import os
|
||||
import sys
|
||||
import time
|
||||
import difflib
|
||||
import builtins
|
||||
|
||||
from xonsh.tools import (XonshError, print_exception, DefaultNotGiven,
|
||||
|
@ -379,7 +378,7 @@ class BaseShell(object):
|
|||
partial_string_info = check_for_partial_string(src)
|
||||
in_partial_string = (partial_string_info[0] is not None and
|
||||
partial_string_info[1] is None)
|
||||
if line == '\n' and not in_partial_string:
|
||||
if (src == '\n' or src.endswith('\n\n')) and not in_partial_string:
|
||||
self.reset_buffer()
|
||||
print_exception()
|
||||
return src, None
|
||||
|
|
|
@ -12,7 +12,7 @@ from xonsh.environ import xonshrc_context
|
|||
from xonsh.execer import Execer
|
||||
from xonsh.platform import (best_shell_type, has_prompt_toolkit,
|
||||
ptk_version_is_supported)
|
||||
from xonsh.tools import XonshError, to_bool_or_int
|
||||
from xonsh.tools import XonshError, to_bool_or_int, print_exception
|
||||
from xonsh.events import events
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"""Bash-like interface extensions for xonsh."""
|
||||
|
||||
|
||||
@events.on_precommand
|
||||
def bash_preproc(cmd):
|
||||
return cmd.replace('!!', __xonsh_history__.inps[-1].strip())
|
||||
|
|
Loading…
Add table
Reference in a new issue