Commit graph

2184 commits

Author SHA1 Message Date
Andy Kipp
8ab1b9a0ee
jobs: default representation changed to dict (#5363)
* update

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

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

---------

Co-authored-by: a <1@1.1>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-26 10:26:24 +02:00
a
a8a604d4c5 wip 2024-04-26 13:37:19 +05:30
a
24fdfece1e XONSH_TRACE_SUBPROC returns more useful details. 2024-04-26 13:37:19 +05:30
Andy Kipp
26c6e119e2
Shortcut for shell-type (#5367)
* Shortcut for shell-type

* Shortcut for shell-type

---------

Co-authored-by: a <1@1.1>
2024-04-25 20:10:18 +02:00
Andy Kipp
4dc17ca600
Downgrade AppImage to 3.11 (#5364)
* Update rever.xsh

* Create appimage_py311.rst
2024-04-25 11:46:36 +02:00
Andy Kipp
273f12d329
Add thread details to the exception (#5360)
* thread details

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

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

---------

Co-authored-by: a <1@1.1>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-24 11:15:40 +02:00
Andy Kipp
af9c3afa23
Added detailed info about thread to thread exceptions (#5357)
* update

* update

* update

* update

* update

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

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

---------

Co-authored-by: a <1@1.1>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-24 08:46:04 +02:00
Gil Forsyth
c508e0de60
Updated CHANGELOG for 0.16.0 2024-04-23 14:34:31 -04:00
Andy Kipp
cc143b1ece
Pin ptk for AppImage (#5356)
* Update pre-requirements.txt

* Update appimage-py312.rst
2024-04-23 10:31:41 +02:00
Andy Kipp
330f150f6a
EnvPath methods (append, remove, add, insert) prepare the path (#5349)
* EnvPath methods (append, remove, add, insert) prepare the path before add.

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

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

* update

* update

* update

* update

* update

---------

Co-authored-by: a <1@1.1>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-21 10:03:42 +02:00
Noortheen Raja
667efceb72 refactor!: remove confusing hook_post_add_argument
current usecase can be solved with custom Action
2024-04-20 23:44:26 +05:30
Andy Kipp
2419eaa952
Fix jobs.py: list index out of range (#5340)
* Update jobs.py

* Create fix-jobs-index.rst

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

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

* Update fix-jobs-index.rst

* Update test_virtualenv_activator.py

* Update test_virtualenv_activator.py

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

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

* Update test_virtualenv_activator.py

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

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

* test: update venv activator test

* chore: update test xonsh

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Noorhteen Raja NJ <jnoortheen@gmail.com>
2024-04-19 10:33:30 +02:00
Gil Forsyth
fde07cda5f
refactor(aliases): source foreign shell funcs without interactive mode (#5344)
Co-authored-by: Noortheen Raja <jnoortheen@gmail.com>
2024-04-18 19:51:39 +05:30
Andy Kipp
6c94d4ad6c
Builtin aliases (xontrib, history) switched to threadable mode (#5321)
* Create xonfig_xontrib_threadable.rst

* xonfig and xontrib threadable

* xonfig and xontrib threadable

* xonfig and xontrib threadable

* Update builtin_aliases_threadable.rst

* Update xonfig.py

---------

Co-authored-by: a <1@1.1>
2024-04-16 13:27:55 -04:00
Noortheen Raja
2a6e5e15f8 docs: update contribution guide 2024-04-16 11:23:35 -04:00
Noortheen Raja
912c7d395c refactor!: remove deprecated module xonsh.proc 2024-04-16 11:23:35 -04:00
Andy Kipp
db83a3f353
Bump xonsh.AppImage to python 3.12 (#5338)
* Update rever.xsh

* Create appimage-py312.rst

* Update appimage-py312.rst
2024-04-16 11:37:20 +02:00
Peter Ye
a7688f647d
fix: do not attempt to color traceback for error in xonshrc file (#5331)
do not color traceback unless shell has been loaded
2024-04-11 08:22:08 +05:30
l-no
a028c72deb
fix: Error in completions with absolute paths (#5127) (#5328)
fix: Error in completions with absolute paths

fixes #5127, an error in fetching command completions when
UPDATE_COMPLETIONS_ON_KEYPRESS is enabled and the command is specified
by absolute path.
2024-04-10 11:18:46 +05:30
Peter Ye
5a525e3789
feat: allow square brackets in command arguments (#5326)
Allow square brackets in command arguments
2024-04-09 22:33:43 +05:30
Peter Ye
08ac0d9759
Fix parsing of redirect tokens (#5322)
* Fix parsing of redirect tokens

In the parser, wrap redirect tokens such as ">", "a>", and "2>1" in a
tuple (along with the name of the redirect file, if applicable) to
differentiate them from regular command line arguments.

This ensures that a command like ![echo ">"] is parsed correctly.

We now need 2 types of IO-redirect tokens (IOREDIRECT1 and IOREDIRECT2)
so that the parser knows whether or not an IO-redirect has a file
argument. For example, "a>" has type IOREDIRECT1, whereas "2>1" has
type IOREDIRECT2.

* update ioredir tests

* add tests

* add news

* fix multiple redirections error message
2024-04-05 13:21:54 +05:30
Peter Ye
7461c507b2
Fix incorrect IOREDIRECT tokens in Python mode (#5013)
* add tests

* Fix incorrect IOREDIRECT tokens in Python mode

* add news

* Update lexer used in CompletionContextParser

The completion context lexer should start in subprocess mode so that
operators like ``2>`` are recognized as IOREDIRECT tokens.

This fixes the test case "command 2>/dev/nul{X}" for
test_completion_context.py::test_command.
2024-04-04 16:04:53 +05:30
Noortheen Raja
c930c9f234 fix: web config overwrite existing value
fixes #5297
2024-03-19 16:33:12 +05:30
Noortheen Raja
ce215bb8fe docs: add news item 2024-03-19 16:33:12 +05:30
Andy Kipp
5fd9a25d09
Fix dircolors NotADirectoryError (#5300)
* Update environ.py

* Create fix_dircolors_NotADirectoryError.rst
2024-03-11 16:53:50 -04:00
Gil Forsyth
f5ae75268a
feat(bashpath): add env-var to allow overriding path to bash (#5295)
I've run into issues with bash completion failing when using `nix` to
handle environments.
The nix environment often installs its own `bash` which doesn't respect
the `BASH_COMPLETIONS` env-var.

This allows an (off-by-default) option to override what is returned by
`xonsh.platform.bash_command`.

The removal of the `lru_cache` should be negligible since
`windows_bash_command` has its own `lru_cache` and the other options are
doing an env lookup or returning a string.
2024-03-08 17:57:53 +01:00
Gil Forsyth
43c9aafe61 Updated CHANGELOG for 0.15.1 2024-03-07 10:11:43 -05:00
doronz88
cb85c938b3
pytest: Fix pytest collection starting at pytest>=8.1.0 (#5293) 2024-03-05 23:51:01 +01:00
Daniel Saunders
d4a342f49d
Fix documented default loc parameter for add_one_completer() (#5289)
* Correct documentation about default parameter

* Create DanielSaunders-patch-1.rst
2024-02-27 16:22:12 +01:00
Gil Forsyth
1da7118e23 Updated CHANGELOG for 0.15.0 2024-02-24 19:09:24 -05:00
Andy Kipp
7a915113f6
Pin prompt-toolkit version (#5288)
* Update pyproject.toml

* Create pin-ptk.rst

* chore: strip whitespace

---------

Co-authored-by: Gil Forsyth <gil@forsyth.dev>
2024-02-24 18:42:50 -05:00
Jason R. Coombs
1d54c74832
Mention VS Code supports xonsh as default shell (#5273)
* Add paragraph about support for xonsh as the default shell.

Ref #4469

Also, updated the text to use 'VS Code', which is the preferred short name.

* Add news entry.
2024-02-06 00:29:45 +01:00
Matthieu LAURENT
7c23508afc
Add news item about Atuin support (#5272) 2024-01-30 12:24:36 +01:00
Gil Forsyth
0f16fa7d64 Updated CHANGELOG for 0.14.4 2024-01-16 08:58:06 -05:00
Nathan Monfils
5b20891975
Actually fully disable system clipboard (#5155) (#5261)
Allow to fully disable system clipboard

Fixes #5155

In VI mode, disabling "delete" hotkeys isn't enough.

After discussion in #5261, we don't change the default behavior but
allow fully disabling the system clipboard to better support the
use-case of VI mode user.

Co-authored-by: Nathan Monfils <nmo@escaux.com>
2024-01-15 15:55:23 +05:30
Gil Forsyth
23c50c215e Updated CHANGELOG for 0.14.3 2023-12-05 10:47:54 -05:00
Gil Forsyth
7a5d7c2886
fix(xpip): patch in user site packages for xpip where needed (#5238) 2023-12-05 10:46:49 -05:00
Joshix-1
b2b23a8240
add generic on_pre_spec_run and on_post_spec_run (#5232)
* add generic on_pre_spec_run and on_post_spec_run

* black

* edit docs/events.rst

* news

* Update on_pre_spec_run-on_post_spec_run.rst

---------

Co-authored-by: Andy Kipp <anki-code@users.noreply.github.com>
2023-11-23 12:19:34 +01:00
Gil Forsyth
0b141e56ad Updated CHANGELOG for 0.14.2 2023-11-17 10:58:12 -05:00
doronz88
f308813f15
history: fix json file permissions upon sudo (#5220) (#5221) 2023-10-25 16:26:04 -04:00
Gil Forsyth
0fe0a6c03e
fix(dirstack): use XSH.env for $HOME check, not os.path (#5211)
`os.path.expanduser` relies on the value of `$HOME` set in `os.environ`.
This meant that a user who set `$HOME` would then not end up in that
directory with a no-argument call to `cd` unless they had set
`UPDATE_OS_ENVIRON`.

Now the value of `$HOME` is respected regardless of the setting in `UPDATE_OS_ENVIRON`
2023-09-25 14:53:15 +06:00
ShalokShalom
60f0145ed8
Mention 3.6 instead of 3.5 in docs (#5193)
* Update intro.rst to mention Python 3.6

The homepage mentions 3.6, so I update this section to be in line

* Create upgrade-python-version.rst

Add news item for https://github.com/xonsh/xonsh/pull/5193
2023-08-23 21:30:20 +06:00
Wilfried Pollan
b3c3e60a05
Fix/parse multiline foreign shell aliases (#5191)
* fix: Correctly multi line aliases

Bash aliases can span multi lines for readablity or if they are to long
for one line.

Here we just remove added the backslash before further processing.

* doc: Add news item for fix/parse-multiline-aliases branch

---------

Co-authored-by: Wilfried Pollan <wilfried.pollan@moqodow.com>
2023-08-23 00:47:47 +06:00
Gil Forsyth
16c91b71cc Updated CHANGELOG for 0.14.1 2023-08-16 03:01:35 -04:00
HackTheOxidation
44b661dcc0
Add history delete #4929 (#5172)
* Add `history delete` #4929

* Add news and satisfy linter.

* Added `history delete` for sqlite backend

* Format with black.

* Use REGEXP instead of LIKE for sqlite backend.

* History delete: iterate over entries for sqlite backend.

* Use '='-operator instead of LIKE.
2023-08-14 22:42:26 +05:30
Cosine Chen
0e229fcc8c
Always load rc files except --no-rc is passed (#5099) 2023-07-26 22:44:55 +00:00
Ivan Ogasawara
de74576464
fix: Fix wrong verification for the simple output, introduced by PR5072 (#5174)
* fix: Fix wrong verification for the simple output, introduced by PR5072

* add a news
2023-07-16 21:30:12 +05:30
Noorhteen Raja NJ
769dfbe6aa
Py 312 pre-liminary support (#5156)
* refactor: project requires 3.9+

changed as per NEP-29
https://numpy.org/neps/nep-0029-deprecation_policy.html

* test: nose type tests are deprecated in pytest now

* fix: deprecation of ast.Str and ast.Bytes and .s attribute access

* fix: deprecation of ast.Num,ast.NameConstant,ast.Ellipsis

* refactor: upgrade code to be py39+ using ruff

the changes are auto-generated

* refactor: remove typing.Annotated compatibility code

* fix: temporarily disable having xonsh syntax inside f-strings

* test: skip failing tests

there is no workaround for this version. It might get solved in the
final release though

* refactor: make XonshSession.completer lazily populated

this speedsup the tests as cmd_cache would not be actively populated
when used in default_completers function

* refactor: make presence of walrus operator default
2023-07-04 22:18:37 +05:30
Andy Kipp
041bfb2d29
Become a sponsor to xonsh (#5167) 2023-07-01 13:15:06 +00:00
Evgeny
f303f0f395
Unset the default Semantic Prompt line continuation environment variables (#5160)
* unset default multiline prompt pre/pos env vars

Allows xontribs to differentiate between an explicit user setting of an empty prefix vs. an unset value

* doc: add News item
2023-06-30 09:57:29 +05:30