Commit graph

10364 commits

Author SHA1 Message Date
Gil Forsyth
dad0ccc0a4 Updated authorship for 0.13.4 2022-12-08 09:37:21 -05:00
yotamolenik
e6932747f9
commands_cache: ignore mtime check on non-darwin os (#4988)
* environ: add a configurable value to disable cache

* docs: update env variable doc

Co-authored-by: Noorhteen Raja NJ <jnoortheen@gmail.com>
2022-12-05 21:04:20 +05:30
Qyriad
c07155dbe2
cmd cache: check possibilities when checking if alias overrides (#4996)
* cmd cache: check possibilities when checking if alias overrides

This fixes an issue on Windows where an alias could not override a
command without specifying the path extension.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-23 23:15:19 +05:30
Noorhteen Raja NJ
c63f75efd0
cmd cache refactor - optimize cache usage (#4954)
* todo:

* refactor: remove usage of singleton in cmd-cache

* refactor: pass aliases/env to commands_cache on creation

reduce the usage of singletons

* fix: setting up mockups for tests

* feat: add $XONSH_CACHE_DIR

* refactor: use cache path to stire cmds-cache

* chore: todo

* feat: efficient cache commands per path and modified time

* refactor: move aliases to commands cache

now XonshSession is not needed to setup cmds-cache

* refactor: update tests

* fix: type annotation

* refactor: init aliases at commands-cache

* test: update failing tests

* fix: handle paths mtime changing

* docs: add news item

* refactor: remove $COMMANDS_CACHE_SIZE_WARNING

* fix: loading on windows fails because of setup sequence

* fix: failing tests
2022-11-14 23:52:10 +05:30
Marco Rubin
f61a6d3da0
Add whitespace after full stop in alias message (#4987) 2022-11-09 16:10:34 +05:30
pre-commit-ci[bot]
2da559cd24
[pre-commit.ci] pre-commit autoupdate (#4980)
updates:
- [github.com/asottile/pyupgrade: v3.1.0 → v3.2.0](https://github.com/asottile/pyupgrade/compare/v3.1.0...v3.2.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-01 17:56:50 +05:30
Justin
1fe284122d
fix: web config tool including \r in prompt (#4969)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
2022-10-25 10:07:20 -04:00
austin-yang
ed11f319fa
Fix: Allows user to assign #XONSH_STYLE_OVERRIDES a {Token:str} dictionary #4375 (#4973)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-24 10:46:52 -04:00
Vasilis Gerakaris
9c1a751fee
Fix auto-suggestion completion stacking if no normal completion exists (#4970)
* Fix auto-suggestion completion stacking if no normal completion exists

* Add tests for auto-suggest completions
2022-10-21 00:48:31 +05:30
Vasilis Gerakaris
1d61d8d711 Document that xonshrc files not applied on non-interactive mode 2022-10-20 03:20:33 +05:30
pre-commit-ci[bot]
81f321d670 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.0.0 → v3.1.0](https://github.com/asottile/pyupgrade/compare/v3.0.0...v3.1.0)
2022-10-18 00:19:48 +05:30
Blake Ramsdell
b0c81048af
feat: add on_command_not_found event (#4959) 2022-10-11 08:54:12 -04:00
pre-commit-ci[bot]
7774f76130 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 22.8.0 → 22.10.0](https://github.com/psf/black/compare/22.8.0...22.10.0)
- [github.com/pre-commit/mirrors-mypy: v0.981 → v0.982](https://github.com/pre-commit/mirrors-mypy/compare/v0.981...v0.982)
- [github.com/asottile/pyupgrade: v2.38.2 → v3.0.0](https://github.com/asottile/pyupgrade/compare/v2.38.2...v3.0.0)
2022-10-11 01:12:09 +05:30
Noorhteen Raja NJ
c60368ec82 fix: mypy error on implicit optional 2022-10-05 11:54:05 +05:30
pre-commit-ci[bot]
4c3c361cf9 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-mypy: v0.971 → v0.981](https://github.com/pre-commit/mirrors-mypy/compare/v0.971...v0.981)
2022-10-05 11:54:05 +05:30
Blake Ramsdell
b5c42d6716
Add XONSH_HISTORY_IGNORE_REGEX support (#4953)
* Add XONSH_HISTORY_IGNORE_REGEX support

* Add changelog text

* Add cleanup notes for XONSH_HISTORY_IGNORE_REGEX

* Rename should_append to is_ignored

* Change is_ignored to a History method

* Remove unused re imports

* Docstring formatting cleanup, Black compliance

* Move XONSH_HISTORY_IGNORE_REGEX to History class

* Clarify with parenthesis

* Formatting compliance

* Add validate_ignore_regex check

* Remove validation comment

* Remove XONSH_HISTORY_IGNORE_REGEX test comments

* Add __init__ chaining to DummyHistory

* Add broken test for XONSH_IGNORE_REGEX

* Remove extra test variants

* Fix unit test environment variable name

* Add test for bad regex error output

* Remove unneeded __init__ chaining

* Add test_is_ignore

* Add is_regex and associated tests

* Add doc for XONSH_HISTORY_IGNORE_REGEX

* Change validate_ignore_regex to use is_regex

* Compile regex once and use a cached property

* Let cached_property handle saving regex
2022-10-05 00:16:42 +05:30
Lie Ryan
490f6f2636
#4951 Fix gitstatus prompt when rebasing (#4952)
* #4951 Fix gitstatus prompt when rebasing

* Create fix-gitstatus-rebase.rst
2022-09-28 14:07:51 +06:00
pre-commit-ci[bot]
f54f6978a5
[pre-commit.ci] pre-commit autoupdate (#4949)
updates:
- [github.com/asottile/pyupgrade: v2.38.0 → v2.38.2](https://github.com/asottile/pyupgrade/compare/v2.38.0...v2.38.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-09-27 03:30:43 +05:30
pre-commit-ci[bot]
3c6ef1bdde
[pre-commit.ci] pre-commit autoupdate (#4943)
updates:
- [github.com/asottile/pyupgrade: v2.37.3 → v2.38.0](https://github.com/asottile/pyupgrade/compare/v2.37.3...v2.38.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-09-20 00:59:05 +05:30
Gil Forsyth
0b8c105e5a Updated CHANGELOG for 0.13.3 2022-09-15 09:52:28 -04:00
Gil Forsyth
dad7d9f8be bumped version to 0.13.3 2022-09-15 09:52:27 -04:00
Gil Forsyth
469f3118ac Updated authorship for 0.13.3 2022-09-15 09:52:27 -04:00
Gil Forsyth
7365ad1bc0
fix: do not prepend bg: to noinherit style directives (#4939)
Pygments does not understand a "background" of `noinherit`, only
`noinherit` -- so if we are setting `noinherit`, even for a background
color, we do not prepend `bg:`
2022-09-15 19:18:43 +05:30
Gil Forsyth
84405423df Updated CHANGELOG for 0.13.2 2022-09-15 08:47:38 -04:00
Gil Forsyth
5fb7bfa2da bumped version to 0.13.2 2022-09-15 08:47:38 -04:00
Gil Forsyth
1e9be618bc Updated authorship for 0.13.2 2022-09-15 08:47:24 -04:00
Andy Kipp
45b1244932
Merge pull request #4937 from lieryan/lieryan-fix-typo
Fix typo/grammar errors
2022-09-13 17:12:24 +06:00
Lie Ryan
f9756ba686
Fix missing newline 2022-09-13 11:19:51 +10:00
Lie Ryan
e633f48f4b
Fix grammar 2022-09-13 11:17:42 +10:00
Lie Ryan
3b37c78150 Fix typo ASYC_PROPMT->ASYNC_PROMPT 2022-09-13 11:12:54 +10:00
Ashish Kurmi
23a7507dcc
ci: add minimum GitHub token permissions for workflow (#4936)
Signed-off-by: Ashish Kurmi <akurmi@stepsecurity.io>

Signed-off-by: Ashish Kurmi <akurmi@stepsecurity.io>
2022-09-12 10:56:08 -04:00
pre-commit-ci[bot]
c0072d9c4f
[pre-commit.ci] pre-commit autoupdate (#4933)
updates:
- [github.com/psf/black: 22.6.0 → 22.8.0](https://github.com/psf/black/compare/22.6.0...22.8.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-09-05 18:40:16 -04:00
Andy Kipp
b836134f0c
Update tutorial_hist.rst: remove description of not implemented logic (#4930)
Update tutorial_hist.rst
2022-09-03 10:02:22 -04:00
Andy Kipp
be69ff3ad0
Merge pull request #4836 from amukher3/main
Fix: timeit without arguments produces syntax error
2022-08-31 18:57:28 +06:00
Andy Kipp
3c997a004b
Update branch.rst 2022-08-31 18:43:09 +06:00
Andy Kipp
f345df90aa
Update timings.py 2022-08-31 18:41:05 +06:00
Andy Kipp
57a2dd185b
Update branch.rst 2022-08-31 18:31:02 +06:00
Andy Kipp
25cfcf16e6
Fix: xpip return None instead of command (#4922)
* Update aliases.py

* Create xpip.rst

* Update aliases.py

* Update aliases.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-18 20:19:43 +05:30
Peter Ye
588881803c
Make gitstatus prompt field values None when there is no git repo (#4920)
Make gitstatus prompt fields None when there is no git repo
2022-08-17 10:08:02 +05:30
Peter Ye
6fa83f8305
Do not capture unthreaded callable aliases run with ![] (#4919)
* Fix `cd` command error message when `$THREAD_SUBPROCS=False`

* also test $[]
2022-08-11 22:50:21 +05:30
Gil Forsyth
ffe7b3445c Updated CHANGELOG for 0.13.1 2022-08-10 09:46:22 -04:00
Gil Forsyth
0bf2f72c06 bumped version to 0.13.1 2022-08-10 09:46:22 -04:00
Gil Forsyth
67dce72c7b Updated authorship for 0.13.1 2022-08-10 09:46:22 -04:00
Peter Ye
08b302364a
Update terminal title before executing subprocess (#4916)
* Update terminal title before executing subprocess

This eliminates the need to use `pause_call_resume()`, which causes issues
when it sends SIGSTOP to a process that is in the middle of a syscall
(for example, the `swaymsg` command fails when it gets stopped during
a `recv` syscall).

Additionally, this approach is more flexible, as it allows captured
commands and callable aliases to also be updated as expected in the
terminal's title.

* Clear prompt cache in readline shell

* Add type annotation

* Use reset_key() to only reset current_job

* Convert into PromptField class

* Support PromptField with value of None

Allows {current_job:{} | } to work as expected when current_job is a
PromptField.

* Add tests
2022-08-10 09:50:09 +05:30
Stefano Rivera
9e5af81b89
We can't be sure there's a python binary (#4917)
Debian doesn't currently ship a /usr/bin/python binary, unless a user
specifically installs python-is-python3.

See also: #4802
2022-08-09 21:12:40 +05:30
pre-commit-ci[bot]
cb75d27300 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/flake8: 5.0.2 → 5.0.4](https://github.com/pycqa/flake8/compare/5.0.2...5.0.4)
2022-08-08 15:03:20 -04:00
jbw3
f2ca59a291
Fixing bash completion bug when prefix started with '>', '<', or ':' (#4826)
* Fixing bash completion bug when prefix started with '>', '<', or ':'

* Fixing code formatting

* More code formatting fixes

* Fixing test

* Refactor to fix bug by improving completion parser

* Supporting '<' and '>>' in completion parser

* Support for all IO redirect tokens
2022-08-06 14:37:09 +05:30
Andy Kipp
aa03bc9013
Merge pull request #4909 from xonsh/anki-code-patch-3
Added ujson to xonsh[full] package
2022-08-04 21:35:48 +06:00
Andy Kipp
7216dc1f8b
Merge pull request #4910 from xonsh/anki-code-patch-2
Update dummy.py: simple comment
2022-08-04 19:53:07 +06:00
Andy Kipp
741626b12d
Update dummy.py 2022-08-04 19:39:03 +06:00