This binds Alt/Control+Delete/Backspace to support deletion matching
the motion bindings in `whole_word_jumping`.
Should work mostly out of the box on terminals that generate `\x7f`
when `backspace` is pressed and `\x08` when `control+backspace` is
pressed. Tested to work on Microsoft Terminal (WSL2). For
incompatible terminals, users can set `$XONSH_WHOLE_WORD_CTRL_BKSP
= False` to avoid configuration of the `control+backspace` binding.
* feat: add function to make event registration from function signature
* docs: add xontrib special functions description
* feat: handle xontribs with special functions
also reduce usage of XSH singleton
* fix: missing XSH
for now import singleton
* docs: fix .rst format
* fix: failing tests
* feat: implement primitive xontrib-unload and xontrib-reload
* chore: give explicit name
* docs: update doc
* 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
* We can't be sure there's a python binary
Debian doesn't currently ship a /usr/bin/python binary, unless a user
specifically installs python-is-python3.
However, we can safely assume that a python3 binary exists.
* Use shutil.which, as suggested in review
We aren't subclassing `bdist_wheel` and so the parser table isn't
getting updated correctly at build time, leading to a semi-functional
package. We need to sort this, but not right now.
* Fix tab-completion trailing space for command arguments that use equals sign
* Add test for completion of path ending with equal sign
* Move test_path_completers.py to tests/completers
* Restore _quote_paths() to original behaviour
* Apply trailing equal sign fix to _bash_quote_paths()
Use _bash_quote_paths instead of _quote_paths in complete_from_bash()
* Do not need to pass quote_paths=_bash_quote_paths
We shouldn't fail to start if the available PTK version doesn't support
modal cursor stuff.
(We should probably also make modal cursor stuff optional, but that can
happen later)