xonsh/news
Peter Ye 259fbe540c
fix: do not append empty/comment-only input to history (#4822)
* add test for importing empty .xsh file

* test: empty lines do not get appended to history

prompt-toolkit needs its own test outside of test_base_shell.py because it uses a custom _push() method

* fix: do not append empty/comment-only input to history

Adds a compile_empty_tree argument to Execer.compile()
By default, the argument is `True`, and `compile()` returns a compiled `pass` statement for comment-only input.
When the argument is `False`, `compile()` returns `None` for comment-only input.

The base shell and prompt-toolkit shell use `compile_empty_tree = False` so that they get `None` as the compiled code and don't append the command to the history.

* add news

* fix tests
2022-05-26 17:50:08 +05:30
..
cleanup-use-sighup.rst Send SIGHUP instead of SIGKILL to clean up jobs (#4811) 2022-05-20 23:09:24 +05:30
feat_returncode_enhancements.rst Returncode enhancements (#4798) 2022-05-10 09:43:32 -04:00
fix-broken-bg.rst Fix bg command behaviour (#4810) 2022-05-20 08:45:03 +05:30
fix-ptk-force-quit.rst fix: do not append empty/comment-only input to history (#4822) 2022-05-26 17:50:08 +05:30
fix_exit_error.rst fix: workaround method calls on attributes set to None (#4812) 2022-05-20 22:45:15 +05:30
fixEnvironmentCompletion.rst Fix environment variable completion in strings (#4804) 2022-05-21 10:54:36 +05:30
furo.rst docs: change theme to furo (#4809) 2022-05-18 20:36:45 +05:30
refactor-fish-completer.rst feat: filter completions from fish (#4765) 2022-05-22 22:44:36 +05:30
remove-prompt-ret-code-xontrib.rst refactor: removing prompt_ret_code xontrib (#4815) 2022-05-23 10:18:11 -04:00
TEMPLATE.rst single instance of string.Formatter 2018-10-20 12:22:59 -06:00