Commit graph

10556 commits

Author SHA1 Message Date
Italo Cunha
1e81146bd6
Support deletion in whole_word_jumping xontrib (#4788)
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.
2022-06-05 20:38:06 +05:30
Noorhteen Raja NJ
347bf201de
fix: docs building (#4820) 2022-05-30 20:49:38 +05:30
Noorhteen Raja NJ
ecc1ab1020
xontrib load/unload (#4817)
* 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
2022-05-30 15:33:17 +05:30
jbw3
42f081c8c7
Documenting the HISTCONTROL ignorespace option (#4825) 2022-05-28 21:22:27 +05:30
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
Peter Ye
8e1593b6e7
Update prompt-toolkit to 3.0.29 and remove xfail (#4818)
This fixes the failing test_ptk_prompt() test on Windows.
2022-05-25 09:16:34 +05:30
Noorhteen Raja NJ
e7ab9a4eb8
fix: checking news item pattern (#4814) 2022-05-23 10:19:14 -04:00
Noorhteen Raja NJ
93821fb363
refactor: removing prompt_ret_code xontrib (#4815) 2022-05-23 10:18:11 -04:00
Noorhteen Raja NJ
1e4eb3ade0
feat: filter completions from fish (#4765)
* feat: filter completions from fish

* docs:
2022-05-22 22:44:36 +05:30
Timmy Welch
b123273319
Fix environment variable completion in strings (#4804) 2022-05-21 10:54:36 +05:30
Peter Ye
11b2d6d086
Send SIGHUP instead of SIGKILL to clean up jobs (#4811)
Allows `nohup` command to work properly.
2022-05-20 23:09:24 +05:30
Gil Forsyth
400d2d6c56
fix: workaround method calls on attributes set to None (#4812) 2022-05-20 22:45:15 +05:30
Peter Ye
57f1e4bcbd
Fix bg command behaviour (#4810) 2022-05-20 08:45:03 +05:30
Gil Forsyth
572ebb576d
docs: change theme to furo (#4809)
Trying out a new theme -- I really like the way `furo` looks and I think
it makes it easier to navigate our overly dense docs pages.
2022-05-18 20:36:45 +05:30
Noorhteen Raja NJ
ed4421ddf4
pr5-pep621 (#4803) 2022-05-10 11:39:43 -04:00
dev2718
e62c0e9cec
Returncode enhancements (#4798)
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
2022-05-10 09:43:32 -04:00
Stefano Rivera
2f3e292cee
We can't be sure there's a python binary (#4802)
* 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
2022-05-10 15:55:03 +05:30
Gil Forsyth
c3fc7edbd2 Updated CHANGELOG for 0.12.4 2022-05-08 17:26:23 -04:00
Gil Forsyth
61eadccb89 bumped version to 0.12.4 2022-05-08 17:26:22 -04:00
Gil Forsyth
329ebf1786 Updated authorship for 0.12.4 2022-05-08 17:26:22 -04:00
Gil Forsyth
3df6de8602
chore: remove wheel from release process
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.
2022-05-08 17:25:27 -04:00
Gil Forsyth
8933eb9d33 Updated CHANGELOG for 0.12.3 2022-05-08 16:58:38 -04:00
Gil Forsyth
ee898f86f7 bumped version to 0.12.3 2022-05-08 16:58:38 -04:00
Gil Forsyth
686f357c3b Updated authorship for 0.12.3 2022-05-08 16:58:38 -04:00
Stefano Rivera
1d16851adf
Add missing space before link in CONTRIBUTING.rst (#4799) 2022-05-08 09:56:57 +05:30
Gil Forsyth
2824013919
fix(xonfig): remove escaped newlines in xonfig web options (#4795) 2022-05-05 14:40:53 -04:00
Noorhteen Raja NJ
3ecb463e0c
feat: update pytest-plugin for pytest-v8 (#4791) 2022-05-05 14:01:46 -04:00
Noorhteen Raja NJ
15ff663530
Rm xontrib meta (#4790) 2022-05-04 15:02:20 -04:00
Peter Ye
baa4ade262
fix: item order of pretty-printed dictionaries (#4786) 2022-04-30 08:25:52 +05:30
doronz88
22cb921686
fix: remove os.path.basename from _get_git_branch() (#4783) 2022-04-27 22:11:13 +05:30
Noorhteen Raja NJ
73a880f76a
chore: drop py3.7 (#4770) 2022-04-26 09:00:31 -04:00
Gil Forsyth
e0a0394bfc Updated CHANGELOG for 0.12.2 2022-04-25 10:52:15 -04:00
Gil Forsyth
0ac049e62c bumped version to 0.12.2 2022-04-25 10:52:15 -04:00
Gil Forsyth
9ebe5b38a1 Updated authorship for 0.12.2 2022-04-25 10:52:15 -04:00
Gil Forsyth
3b3b2fe459
chore: add wheel to pypi release activity 2022-04-25 10:51:01 -04:00
Noorhteen Raja NJ
5da6a1babc
fix: gitstatus prompt (#4772) 2022-04-23 07:01:04 +05:30
Peter Ye
e1dc61eb04
fix: completions for command argument paths after equal signs (#4767)
* fix: completions for command argument paths after equal signs

* found a better solution to the problem
2022-04-21 21:08:30 +05:30
Noorhteen Raja NJ
ed9f032a47
Some fixes (#4763) 2022-04-17 10:06:08 +02:00
Peter Ye
09a77c15c9
Fix tab-completion trailing space for cmd arguments that use equals sign (#4750)
* 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
2022-04-16 08:22:54 +05:30
Gil Forsyth
cd334e44e3 Updated CHANGELOG for 0.12.1 2022-04-15 13:10:59 +02:00
Gil Forsyth
83984fb0a9 bumped version to 0.12.1 2022-04-15 13:10:58 +02:00
Gil Forsyth
172e356295 Updated authorship for 0.12.1 2022-04-15 13:10:58 +02:00
Gil Forsyth
6a8b059789
fix: guard modal cursor import for prompt toolkit (#4758)
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)
2022-04-15 16:38:43 +05:30
Noorhteen Raja NJ
8ec73c763a
fix: setting builtins access to abbrevs (#4757) 2022-04-15 12:56:06 +02:00
Gil Forsyth
09a12e4e85 Updated CHANGELOG for 0.12.0 2022-04-14 15:09:22 +02:00
Gil Forsyth
3def9b0ea1 bumped version to 0.12.0 2022-04-14 15:09:22 +02:00
Gil Forsyth
2d7e50ad4e Updated authorship for 0.12.0 2022-04-14 15:09:22 +02:00
Noorhteen Raja NJ
fb6b9109ed
docs: update for release activity (#4754) 2022-04-14 14:51:02 +02:00
Noortheen Raja
bff0794b68 ci: news-item checker cleanup 2022-04-12 14:19:15 +05:30
Noortheen Raja
1476f1adaa feat: add xontrib-django 2022-04-12 14:19:15 +05:30