some flake cleanup

This commit is contained in:
Anthony Scopatz 2016-11-20 18:49:26 -05:00
parent 5ff0605569
commit 69969988ef
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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())