Commit graph

25 commits

Author SHA1 Message Date
Tim Gates
37f6adb159
docs: Fix a few typos (#4889)
There are small typos in:
- docs/python_virtual_environments.rst
- setup.py
- xonsh/procs/specs.py
- xontrib/abbrevs.py

Fixes:
- Should read `interpreter` rather than `intrepreter`.
- Should read `dictionary` rather than `disctionary`.
- Should read `descriptors` rather than `descriptiors`.
- Should read `because` rather than `becuase`.

Signed-off-by: Tim Gates <tim.gates@iress.com>
2022-07-23 04:42:46 +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
Noorhteen Raja NJ
8ec73c763a
fix: setting builtins access to abbrevs (#4757) 2022-04-15 12:56:06 +02:00
Noortheen Raja
78091a22f3 style: isort imports
fix #4584
2022-01-31 11:16:51 -05:00
Noorhteen Raja NJ
a00b6014fe
chore: type check xontribs,xompletions (#4642)
as well as match dmypy semantics
2022-01-18 09:54:31 -05:00
Noorhteen Raja NJ
948129b7a0
feat: add flake8-bugbear (#4288)
* feat: add flake8-bugbear

* style: remove pylint disable comments

* chore: add flake8 as pre-push check

* chore: add bunch pf pre-commit hooks

* style: remove hasattr __call__
2021-05-26 23:15:34 +03:00
Noorhteen Raja NJ
38295a1dd9
Remove globals (#4280)
* refactor: remove usage of global variables in abbrevs.py

* chore: add flake8-mutable to prevent mutable defaults

* fix: abbrevs expand test

* refactor: add xonsh session singleton

* refactor: fix circular errors when using xonshSession as singleton

* refactor: remove black magicked builtin attributes

* style: black format tests as well

* refactor: update tests to use xonsh-session singleton

* refactor: update abbrevs to not use builtins

* test: remove DummyCommandsCache and patch orig class

* fix: failing test_command_completers

* test: use monkeypatch to update xession fixture

* fix: failing test_pipelines

* fix: failing test_main

* chore: run test suit as single invocation

* test: fix tests/test_xonsh.xsh

* refactor: remove builtins from docs/conf.py

* fix: mypy error in jobs

* fix: test error from test_main

* test: close xession error in test_command_completers

* chore: use pytest-cov for reporting coverage

this will include subprocess calls, and will increase coverage

* style:
2021-05-20 13:14:26 +03:00
Noorhteen Raja NJ
b7b2c9a916
fix: abbrevs with callback alters buffer text before expansion (#4156)
* fix: abbrevs with callback alters buffer text before expansion

fixes #3642

* docs: add news item
2021-03-09 09:07:53 -05:00
Noorhteen Raja NJ
d50cf32f84
Feat abbrevs callback (#4031)
* feat: support callbacks in abbrevs dict

facilitate solving problems like #3642

fixes #3642

* test: add tests for abbrevs and news item

* fix: mypy error

* refactor: update imports for xontrib_meta module
2021-01-29 12:18:22 -05:00
David Strobach
9ba2eb5934 abbrevs: Allow for setting cursor position within expanded abbrev 2020-08-13 14:12:16 +02:00
David Strobach
7cf5a91673 Revert abbrevs expansion on the second consecutive space keypress 2020-08-04 16:19:41 +02:00
Bob Hyman
53bfe8c99c
Add ptk3 (#3521)
* delete package ptk; rename ptk2 to ptk_shell.; leave ptk2 as alias for ptk_shell.
* SHELL_TYPE "prompt_toolkit" only; remove ptk1 specific behavior.
* Doc updates: eliminate reference to prompt-toolkit < 2.0
* update requirements files ptk>=2; test shell_style="none"
* fix ptk2 stub per code review
* Add ptk2 to list of packages to install.
2020-04-18 10:44:27 -04:00
Morten Enemark Lund
0d8c0b613a
Merge pull request #3492 from laloch/abbrevs-completions-confirm
abbrevs: do not handle return key while a completion is selected
2020-03-31 14:17:24 +02:00
David Strobach
7e2b8105fa abbrevs: do not handle return key while a completion is selected 2020-03-30 20:05:38 +02:00
David Strobach
e7df18840d abbrevs: only trigger completion if the word is preceded by space 2020-03-27 23:12:34 +01:00
David Strobach
9978f6bdd7 abbrevs: fix possible exception and do some cleanup 2020-03-25 23:36:29 +01:00
David Strobach
20578fe806 black 2020-03-25 22:45:12 +01:00
David Strobach
6d1713c423 abbrevs: move abbrevs dict to the session context 2020-03-25 22:42:35 +01:00
David Strobach
43a4b9b66a abbrevs: fix ptk2 2020-03-25 20:46:41 +01:00
David Strobach
947fa2d0b5 abbrevs: don't overwrite the dictionary if it already exists 2020-03-25 20:35:19 +01:00
David Strobach
e5621ef369 add some docs 2020-03-25 20:12:30 +01:00
David Strobach
76633b0e47 abbrevs: do not expand within strings 2020-03-25 18:29:05 +01:00
David Strobach
43f15fb5e2 abbrevs: only expand whole words on return key press 2020-03-25 18:02:02 +01:00
David Strobach
32b093b422 abbrevs: add handler for return key 2020-03-25 17:30:28 +01:00
David Strobach
d619127503 Add fish-like command abbreviations 2020-03-25 14:59:50 +01:00