Sun Jan 18 12:23:46 UTC 2026 - Sebastian Wagner <sebix@sebix.at>
- Update to version 0.22.1:
- Features
- Added expanding aliases to `showcmd` command using `-e` argument ([#6041](https://github.com/xonsh/xonsh/issues/6041)) ([5b706d4](https://github.com/xonsh/xonsh/commit/5b706d493e6deb4cd2b6935a56495547b558d083))
- **prompt:** Added XONSH_PROMPT_NEXT_CMD to set the text of the next command that will be inserted in the next prompt ([#6037](https://github.com/xonsh/xonsh/issues/6037)) ([8a04bad](https://github.com/xonsh/xonsh/commit/8a04bad17ad38848e75c7b7f320111e9399c6c28))
- Bug Fixes
- **appimage:** Fixed `xpy` value in `xcontext` in xonsh AppImage ([#6033](https://github.com/xonsh/xonsh/issues/6033)) ([5f27c06](https://github.com/xonsh/xonsh/commit/5f27c06aa3f9423701586252bdbbfce7d34ba6e7))
- **source-foreign:** Quote pathnames when sourcing a foreign function ([#6014](https://github.com/xonsh/xonsh/issues/6014)) ([818b19a](https://github.com/xonsh/xonsh/commit/818b19a5fac0c1b1407e2f497f37f895c8187534))
Thu Jan 1 10:20:01 UTC 2026 - Sebastian Wagner <sebix@sebix.at>
- Update to version 0.22.0:
- ⚠ BREAKING CHANGES
- Remove aliases `ipynb`, `scp-resume` from builtin aliases and rename `xonsh-reset` to `xreset` ([#5992](https://github.com/xonsh/xonsh/issues/5992))
- Features
- added `xpython` and `xсontext` builtin aliases ([#5989](https://github.com/xonsh/xonsh/issues/5989)) ([4382735](https://github.com/xonsh/xonsh/commit/43827358d205855c6c1c68bed138d656f3657bc3))
- **events:** added `events.handlers()` to get info about registered event handlers and also `events.__repr__` to just `print(events)`. ([#5994](https://github.com/xonsh/xonsh/issues/5994)) ([166a1a6](https://github.com/xonsh/xonsh/commit/166a1a6a826669a24ae5df7a69193fa7bd1604c5))
- Bug Fixes
- allow spaces in auto-suggest completions ([#5993](https://github.com/xonsh/xonsh/issues/5993)) ([4332701](https://github.com/xonsh/xonsh/commit/4332701179c06d7a7ce2853043271eb1aa2e3214))
- **history:** Using absolute path to history file to prevent downstream issues ([#6002](https://github.com/xonsh/xonsh/issues/6002)) ([f1501b2](https://github.com/xonsh/xonsh/commit/f1501b257ce8ec40c10006c763321577bf5550fe))
- Documentation
- add description and examples for `@.env.register` ([#5990](https://github.com/xonsh/xonsh/issues/5990)) ([9ce5d5d](https://github.com/xonsh/xonsh/commit/9ce5d5d3d58b00b642856f4dc48dbac9b25f63c1))
- Update tutorial to replace prompt ([#6007](https://github.com/xonsh/xonsh/issues/6007)) ([3260b77](https://github.com/xonsh/xonsh/commit/3260b77ab4d4d8fa2dc5fb61e7509a0a7eaaa9bc))
- Update xonsh logo in the docs ([#6004](https://github.com/xonsh/xonsh/issues/6004)) ([dbeb276](https://github.com/xonsh/xonsh/commit/dbeb27688bdbbd5efd6ffcc246ce4181df4f66bc))
- Code Refactoring
- Remove aliases `ipynb`, `scp-resume` from builtin aliases and rename `xonsh-reset` to `xreset` ([#5992](https://github.com/xonsh/xonsh/issues/5992)) ([df3ff49](https://github.com/xonsh/xonsh/commit/df3ff497e9e73dbc3a1e86c6f14ad7e5e57bccaa))
- Update to version 0.21.2:
- Bug Fixes
- appimage upload to release ([#5982](https://github.com/xonsh/xonsh/issues/5982)) ([7965b1f](https://github.com/xonsh/xonsh/commit/7965b1ffef2d934484a121a39bf7f789b3c22e0b))
- Update to version 0.21.1:
- Bug Fixes
- conditional checks for docs deployment ([#5980](https://github.com/xonsh/xonsh/issues/5980)) ([addaffe](https://github.com/xonsh/xonsh/commit/addaffe986e006b9615091d6c7863e618edad5a0))
- Update to version 0.21.0:
- ⚠ BREAKING CHANGES
- `$AUTO_SUGGEST` is now deprecated in favour of `$XONSH_PROMPT_AUTO_SUGGEST`
- Features
- Added `@` as a global object that provides easy access to `@.env`, `@. lastcmd ` and `@.imp`(inline-imports) ([#5956](https://github.com/xonsh/xonsh/issues/5956)) ([64e3a3c](https://github.com/xonsh/xonsh/commit/64e3a3c467e1b2a42083e5c2dae0dbd9e0910087))
- added support for multiline shebang (guix fixed) ([#5957](https://github.com/xonsh/xonsh/issues/5957)) ([e9e0055](https://github.com/xonsh/xonsh/commit/e9e0055c6cd5fd867c4268fa311d098e81d2beeb))
- added support for using a p-string as a context manager to temporarily change the working directory (e.g., with p'~/test'.mkdir().cd(): $[pwd]) ([d9a14c1](https://github.com/xonsh/xonsh/commit/d9a14c1f8c38d3e66c15a9ff39678b3f14893313))
- allow numerical tokens in environment variable references ([#5891](https://github.com/xonsh/xonsh/issues/5891)) ([9ae6911](https://github.com/xonsh/xonsh/commit/9ae69117c65c305ef2511fe6a66e6965f01d174c))
- expand `~`(User's home path) in `xonsh.tools.chdir` function ([#5969](https://github.com/xonsh/xonsh/issues/5969)) ([192248a](https://github.com/xonsh/xonsh/commit/192248a0571a8a1dfa57e4bb7ac5fd784cad6a9f))
- Update tutorial example for piping into an alias ([#5955](https://github.com/xonsh/xonsh/issues/5955)) ([07d4334](https://github.com/xonsh/xonsh/commit/07d43341b981c251049855f04edaa025a4f1b1b7))
- Documentation
- Add verification file for ads.fund project ([#5946](https://github.com/xonsh/xonsh/issues/5946)) ([2482f06](https://github.com/xonsh/xonsh/commit/2482f06ef042d8a47f175e1eab45d6af4c9dcd0d))
- Update tutorial to reduce `${...}` accent ([#5975](https://github.com/xonsh/xonsh/issues/5975)) ([e229ea5](https://github.com/xonsh/xonsh/commit/e229ea555cd53902b3cc72033b6a25111fde6a55))
- Code Refactoring
- `$AUTO_SUGGEST` is now deprecated in favour of `$XONSH_PROMPT_AUTO_SUGGEST` ([1e5bda4](https://github.com/xonsh/xonsh/commit/1e5bda4402f4f3257b1aa68b01cb22a8c6c4b485))
- Update to version 0.20.0:
- ⚠ BREAKING CHANGES
- drop support for Python versions below 3.11
- auto-load xontribs after loading RC files ([#5873](https://github.com/xonsh/xonsh/issues/5873))
- Features
- Allow sourcing files with different extensions ([#5938](https://github.com/xonsh/xonsh/issues/5938)) ([296a683](https://github.com/xonsh/xonsh/commit/296a6831e11380b37564f27e118629b78a19cfb9))
- allow specifying special files as scripts ([d487f06](https://github.com/xonsh/xonsh/commit/d487f06f9ded99039dd2bce35b807fa48213f76f))
- Allow specifying special files as scripts ([#5886](https://github.com/xonsh/xonsh/issues/5886)) ([d487f06](https://github.com/xonsh/xonsh/commit/d487f06f9ded99039dd2bce35b807fa48213f76f))
- **completers:** add completion for inline xonsh importer ([#5917](https://github.com/xonsh/xonsh/issues/5917)) ([e10a3aa](https://github.com/xonsh/xonsh/commit/e10a3aae5f2aa64bf140f8bfb4c75acfb7e8fc98))
- Keep hash (`#`) if it's part of the string in subprocess commands ([#5941](https://github.com/xonsh/xonsh/issues/5941)) ([2757a9a](https://github.com/xonsh/xonsh/commit/2757a9a79fe5c5854b60339d1ea99f12ceb1447c))
- Bug Fixes
- ensure PATH is EnvPath when using --no-env flag ([#5870](https://github.com/xonsh/xonsh/issues/5870)) ([#5903](https://github.com/xonsh/xonsh/issues/5903)) ([c73d599](https://github.com/xonsh/xonsh/commit/c73d599751d14c75aca15400fb3bfe21997a45a3))
- filter escape sequences after decoding in captured stdout and stderr ([#5939](https://github.com/xonsh/xonsh/issues/5939)) ([#5940](https://github.com/xonsh/xonsh/issues/5940)) ([9df5cce](https://github.com/xonsh/xonsh/commit/9df5ccedf00c8114225625974db11f4fe58b320a))
- map Name.Builtin to Color.GREEN when undefined ([#5908](https://github.com/xonsh/xonsh/issues/5908)) ([9a23e2e](https://github.com/xonsh/xonsh/commit/9a23e2ef40fce2f946bd01b2a9fc6855940ecc36))
- missing docstring for argument "verbose" of xontribs_unload and xontribs_reload ([#5922](https://github.com/xonsh/xonsh/issues/5922)) ([97265ed](https://github.com/xonsh/xonsh/commit/97265edffc6ad1084644ca5d3e2f1844904a13a0))
- remove redundant "command not found" ([#5915](https://github.com/xonsh/xonsh/issues/5915)) ([2db28a0](https://github.com/xonsh/xonsh/commit/2db28a0836374ad44e2ba34c5760b3353e06df67))
- Fixed completions for command argument paths after equal signs
- A trailing space no longer gets appended when tab-completing command arguments that involve equals signs. For example `dd sta` gets completed to `dd status=`, without a space space after the equals sign.
- regression on `gitstatus <https://github.com/xonsh/xonsh/pull/4771>`_ prompt is fixed now. It will display the value now instead of the name.
- `fixed <https://github.com/xonsh/xonsh/pull/4763>`_ ``vox rm`` crashing when user input is required
- fixed regression issue in loading `xontrib-abbrevs <https://github.com/xonsh/xonsh/pull/4757>`_
- Allow xonsh to start gracefully even if modal cursors aren't in the available
prompt_toolkit version
- update to version 0.12.0:
- Added:
- Added interface to complete any alias that has ``xonsh_complete`` attribute. It is a function with ``fn(**kwargs) -> Iterator[RichCompletion | str]`` signature.
- added ``$ALIAS_COMPLETIONS_OPTIONS_LONGEST`` to control showing options in completions
- added ``$CMD_COMPLETIONS_SHOW_DESC`` environment variable to control showing command completions with a description part.
- `completer complete` command is added to test current completions
- completions from man page will now show the description for the options if available.
- ``$XONSH_COMPLETER_DIRS`` to put command completers
- ``Aliases.register`` to register an alias function.
- Tracebacks are now printed in color if available (interactive session with shell that supports colors with pygments installed and $COLOR_RESULTS enabled)
- Added python's match statement for python >=3.10.
- Added support for the $SHLVL environment variable, typed as int, using bash's semantics.
- Python files with command completions can be put inside ``xompletions`` namespace package,
they will get loaded lazily.
- `xontrib.fish_completer` is available to complete using `fish` shell.
- Support for pythons sys.last_type, sys.last_value, sys.last_traceback.
- added ``xonsh-uname`` command to ``xoreutils``
- auto-completion support for commands : ``source-foreign``, ``source-bash``, ``source-zsh``, ``source-cmd``
- added ``history transfer`` command to transfer history entries between backends.
- now ``$PROMPT_FIELDS`` is a custom class with method ``pick(field_name)`` to get the field value efficiently.
The results are cached within the same prompt call.
- new class ``xonsh.prompt.base.PromptField`` to ease creating/extending prompt-fields
- **Sublime Text 4** extension to the Editors page.
- Support for the `virtualenv <https://virtualenv.pypa.io/en/20.0.1/extend.html#activation-scripts>`_ ``activate.xsh`` script is back! Ensure you create the virtualenv from the same python where xonsh is installed.
- vox new/create accepts a new ``--prompt`` argument, which is passed through to ``python -m venv``
- New set of commands and options to manage virtualenvs inspired from ``pew``
* runin
* runinall
* new
* ``--link`` : to associate venv with project directory
* ``--temp`` : to create temporary virtualenvs
* activate
* now will cd into project directory if the venv is associated
* toggle-ssp - toggle system site packages
* project - manage project path associations
* wipe - to quickly remove all user installed packages
- ``prompt.env.env_name`` is now aware of the "prompt" key in ``pyvenv.cfg`` - search order from first to last is: ``$VIRTUAL_ENV_PROMPT``, ``pyvenv.cfg``, ``$VIRTUAL_ENV``, $``CONDA_DEFAULT_ENV``
- new command ``vox upgrade``
- ``xonfig web`` can now update ``abbrevs/aliases/env-variables``.
- Added `xontrib-default-command <https://github.com/oh-my-xonsh/xontrib-default-command>` to xontrib list.
- new `xontrib-django <https://github.com/jnoortheen/xontrib-django>`_ for django management completions
- Added `xontrib-gruvbox <https://github.com/rpdelaney/xontrib-gruvbox>` to xontrib list.
- Added `xontrib-up <https://github.com/oh-my-xonsh/xontrib-up>` to xontrib list.
- Changed:
- Both ``*.xsh`` and ``*.py`` files inside ``$XONSHRC_DIR`` will get loaded now.
- Environment-variables of no predefined type or path environment variables are now represented as strings via the empty string.
- Made stacktraces behave like in python, i.e. when something in user-provided code fails (both interactively and non-interactively), only that part is shown, and the (static) part of the stacktrace showing the location where the user code was called in xonsh remains hidden. When an unexpected exception occurs inside xonsh, everything is shown like before.
- run_compiled_code, run_script_with_cache, run_code_with_cache now return sys.exc_info() triples instead of throwing errors
- SyntaxError tracebacks now by default hide the internal parser state (like in python); set XONSH_DEBUG >= 1 to enable it again.
- XonshError tracebacks now by default hide xonshs internal state; set XONSH_DEBUG >= 1 to enable it again.
- run_code_with_cache takes a new parameter display_filename to override the filename shown in exceptions (this is independent of caching)
- Update uptime lib by the last one from Pypi
- ``umask``, ``ulimit`` commands will not override the system's commands unless requested
- Xontribs that require other third party packages are moved to its own packages.
The following xontribs are moved and can be loaded after install as usual
* mpl
* distributed
* jupyter-kernel
* jedi
- Xonsh adopts `NEP-0029 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ in supporting Python versions.
- Privatise certain attributes of lexer/parser to minimise API surface
- Make `XSH.load` calls explicit (not in Execer)
- Make import hooks require Execer
- Simplified foreign functions
- Updated tutorial.rst to clarify use of time_format
- ``vox new`` will use default python version of the system rather than the one vox is run with
- ``xonfig web`` now shows latest xontribs available from ``xonsh.xontribs_meta``
- Removed:
- ``$XONSH_GITSTATUS_*`` is removed
since the prompt fields can be customized easily now individually.
- ``$XONSH_GITSTATUS_FIELDS_HIDDEN`` is removed.
Please set hidden fields in ``$PROMPT_FIELDS['gitstatus'].hidden = (...)``
- Removed ``xonsh.ptk2`` module whcih was kept for some old packages sake. Now xonsh requires atleast ptk3 version.
- Fixed:
- Some of the bash completions scripts can change path starting with '~/' to `/home/user/` during autocompletion.
xonsh `bash_completions` does not expect that, so it breaks autocompletion by producing paths like `~/f/home/user/foo`.
After the fix if bash returns changed paths then `/home/user` prefix will be replaced with `~/`.
- ``pip`` completer now handles path completions correctly
- SyntaxErrors thrown during compilation (i.e. not during parsing) now include the offending source line.
- If a .xsh file is imported, the resulting module will now always have an absolute \_\_file\_\_ attribute to be consistent with pythons behavior since python 3.4.
- ``$CONDA_DEFAULT_ENV`` is now respected when xonsh is run outside of conda.
- Fixed unpacking of dictionaries inside a dictionary
- Empty or comments only .xsh files can now be imported to align with pythons behavior.
- Fixed regex globbing for file paths that contain special regex characters (e.g. "test*1/model")
- Fixed list comprehension in return statement incorrectly being parsed as a subprocess command.
- Fixed the expansion of $XONSH_TRACEBACK_LOGFILE user paths (e.g. "~/log")
- Fixed DeprecationWarning when providing autocompletion for a non-callable type with ``(``
- OSC codes in ``$PROMPT`` is no longer removed when using ptk shell.
- Attempt to show a modal cursor in vi_mode (ie. block in cmd, bar in ins)
- Xonsh can now be used in VIM (e.g. by ":read !ls" if VIM is configured to use xonsh. This may be the case when xonsh is the default shell.)
- Fixed OSError on Windows when GnuWin32 is installed in the PATH.
- Do not show welcome message when any ``$XONSHRC_DIR`` directory entry exists.
- SyntaxErrors now get initialized with all available fields so that the error message can be formatted properly.
- Raising BaseException no longer causes Xonsh to crash (fix #4567)
- Exceptions in user code when using xonsh non-interactively no longer simply crash xonsh, rather a proper stacktrace is printed and also postmain() is called.
- Tracebacks will now show the correct filename (i.e. as in python) for interactive use "<stdin>", scripts read by stdin "<stdin>" and -c commands "<string>". (Instead of MD5 hashes as filenames or "<xonsh-code>")
- Default ZSH FUNCSCMD was not working in ZSH 5.8 (and possibly other versions)
- Passing multiple files to be sourced to source-foreign was broken
- prompt field ``current_branch`` will now work empty git repository.
- added new utility classes ``xonsh.cli_utils.ArgParserAlias``, ``xonsh.cli_utils.ArgCompleter``.
These are helper classes, that add coloring and auto-completion support to the alias-commands.
- when ``$ENABLE_ASYNC_PROMPT=True`` lazy load ``prompt-toolkit``'s color-input support.
- Add ``CTRL-Right`` key binding to complete a single auto-suggestion word.
- Show environment variables' type and descriptions when completing them.
- Add ``CTRL-Backspace`` key binding to delete a single word via ``$XONSH_CTRL_BKSPC_DELETION``.
- Improved ``pip``/``xpip`` completer.
- Separator used by gitstatus can now be styled using ``XONSH_GITSTATUS_SEPARATOR``.
- Complete 'import' statements with modules that aren't loaded.
- Complete multiple modules/objects in 'import' statements.
- Multiple new metadata fields in ``setup.py``
- Pure Python control files are now supported when named ``*.py``.
Using python files may lower the startup time by a bit.
- new environment variable ``$XONSH_TRACE_SUBPROC_FUNC``
to handle ``$XONSH_TRACE_SUBPROC`` output
- Added `xontrib-pyrtn <https://github.com/dyuri/xontrib-pyrtn>` to xontrib list.
- Changed:
- Display error message when running `xonfig colors` in a non-interactive shell
- Using ``ArgparserAlias`` for ``dirs``, ``popd``, ``pushd``
- use ``ArgparserAlias`` for ``disown`` alias with completion support
- ``history`` alias now has colored help message and completion support when running interactively.
- using ``ArgparserAlias`` for ``trace`` alias with completion support
- improve ``vox`` CLI completions
- use ArgparserAlias for ``xexec``. Now it supports completions.
- ``xonfig`` now has colored help message when ran interactively.
- Using ``ArgparserAlias`` to improve ``xontrib`` completions
- Changed !() to also capture background subprocesses
- Suggested commands are cached for better performance.
- Improved pipelines performance by using a mutable buffer.
- Curly braces { } in directory names are now escaped in the prompt
- The ``--rc`` argument is extended to support directories as well as files.
Passing a directory will result in all ``*.xsh`` files in the directory being
sorted and loaded at startup (equivalent to using the environment variable
``XONSHRC_DIR``).
- The environment variables ``XONSHRC`` and ``XONSHRC_DIR`` are no longer updated by xonsh on
startup according to which files were actually loaded. This caused problems if xonsh is called
recursively, as the child shells would inherit the modified startup environment of the parent.
These variables will now be left untouched, and the actual RC files loaded (according to those
variables and command line arguments) can be seen in the output of ``xonfig``.
- Replaced `xontrib-linuxbrew <https://github.com/eugenesvk/xontrib-linuxbrew>`_ with `xontrib-homebrew <https://github.com/eugenesvk/xontrib-homebrew>`_, which also supports Homebrew on macOS
- Removed:
- Completely dropped the deprecated ``--config-path`` argument, which no longer
did anything.
- The environment variable ``LOADED_RC_FILES`` is no longer set. It contained a list of booleans
as to which RC files had been successfully loaded, but it required knowledge of the RC loading
internals to interpret which status corresponded to which file. As above, the (successfully)
loaded RC files are now shown in ``xonfig``.
- Fixed:
- Add quotes in autocomplete when filename contains brackets
- Handle ``None`` value on XSH.env if ``$UPDATE_OS_ENVIRON`` is set to ``True``
- Implemented `__hash__` method to Env, so that it can be used in `lru_cache` without crashing.
- Make sure aliases are always captured regardless of ``$XONSH_CAPTURE_ALWAYS``
- ``fromdircolors`` doesn't crash if output from subprocess call to ``dircolors`` returns
nothing (usually due to permission errors)
- Fixed issue with environment not being iterable on session objects.
- Fixed issue where environment is None in commands cache.
- ``${...}.swap()`` can be called from multiple threads safetly.
- Piping multiple function aliases doesn't raise a recursion error anymore.
- Fixed detection of App Execution Alias for latest 3.8 and 3.9 releases
- ``Jedi`` completer doesn't complete paths with ``~``.
- Sometimes the completion menu doesn't take space when cursor is at the bottom of the screen.
- vox now passes system-site-packages option
- Fix Duplicate paths left over when add paths to Path via xonsh.tools.EnvPath
- Fix Crash with FileNotFoundError when current working directory is deleted #4467
- Completing a single-arg python code segment (e.g. ``@(/etc/hos<TAB>)``).
- Fixed pipelines in WSL2
- Newline symbols in Prompt-toolkit's completions are replaced by <space>
- Fix launching processes on Windows by using full paths (https://bugs.python.org/issue8557)
- ``execx`` and ``xonsh -c`` previously exposed xonsh-internal code in global scope. They also did not support defining variables and then referring to them in comprehensions, generators, functions, or lambdas. - https://github.com/xonsh/xonsh/issues/4363
- Short color token names can be used in ``register_custom_style()`` (#4339)
- update to version 0.10.0:
- Added:
- Added ability to set XONSH_HISTORY_FILE before loading the history backend.
- Added ability to get the arguments list in ExecAlias using ``$args`` and ``$arg<n>`` environment variables.
- Added instruction how to run xonsh AppImage on Alpine
- Xonsh now supports generators as completer functions.
- Completion Context - Allow completers to access a parsed representation of the current commandline context.
- Added casting CommandPipeline to int, hash and str.
- Ability to call the tool by the name from callable alias with the same name without the infinite loop error.
- ``on wsl`` field when running xonfig (when linux is detected)
- Help and superhelp (``obj?`` and ``obj??``) now use the ``__name__`` if available.
- added ``$XONSH_GITSTATUS_FIELDS_TO_HIDE`` to hide unwanted fields from ``{gitstatus}`` prompt field.
- Added number of lines added and removed to gitstatus
- Saving current working directory (cwd) to the history.
- Added environment variable ``$COMPLETE_DOTS`` to specify how current and previous directories should be tab completed in cd ('./', '../'):
- ``always`` Always complete paths with ./ and ../
- ``never`` Never complete paths with ./ and ../
- ``matching`` Complete if path starts with . or ..
- Complete ``import`` keyword in ``from ... import`` statements.
- Enabled case-insensitive completions for the ``jedi`` xontrib.
- Non-exclusive completers that enable aggregating multiple completer results.
- New ``$XONSH_CAPTURE_ALWAYS`` variable for opt-in interactive capturing.
Since this capturing breaks background jobs and some interactive programs (like ``git`` invoking an editor),
This behavior is now opt-in using this variable.
See https://github.com/xonsh/xonsh/pull/4283 and linked issues.
- Wrap selection with quote/parens when ``$XONSH_AUTOPAIR=True``.
- Now xonsh will work with Python 3.10. (Match statement is not supported).
- In addition to reading single rc files at startup (``/etc/xonshrc``, ``~/.config/xonsh/rc.xsh``),
xonsh now also supports rc.d-style config directories, from which all files are sourced. This is
designed to support drop-in style configuration where you could, for example, have a common config
file shared across multiple machines and a separate machine specific file.
This is controlled by the environment variable ``XONSHRC_DIR``, which defaults to
``["/etc/xonsh/rc.d", "~/.config/xonsh/rc.d"]``. If those directories exist, then any ``xsh`` files
contained within are sorted and then sourced.
- Added xontrib-prompt-starship - Starship prompt in xonsh shell.
- Added XONSH_SUBPROC_CAPTURED_PRINT_STDERR (default False) environment variable to hide unwanted printing the stderr when using captured object.
- A ``$XONSH_TRACE_COMPLETIONS`` variable for completions debugging.
- Added warning about prompt-toolkit in the welcome message.
- Added history backend name to the xonfig.
- `xontrib-linuxbrew <https://github.com/eugenesvk/xontrib-linuxbrew>`_ to add Homebrew's shell environment to xonsh shell on Linux
- Added xontrib-macro-lib - the library of the useful macros for the xonsh shell: https://github.com/anki-code/xontrib-macro-lib
- Changed:
- update imphooks encoding regex to match the newer version at PEP 263
- Enabled bracketed paste mode for readline to protect against paste jacking
- The group of environment variables around history moved to the "Interactive Prompt History" section.
- Disabled completing subpaths for commands in ``jedi``.
- Improved ``which`` output for non-simple aliases
- New json history will be in XONSH_DATA_DIR/history_json directory.
- Completers for ``and/or``, ``&&/||/|`` and environment variables are now non-exclusive.
- Disabled ptk copying words/lines to clipboard on deletion (can be re-enabled with ``$XONSH_COPY_ON_DELETE``).
- Separated between ``XONSH_DEBUG`` and ``XONSH_NO_AMALGAMATE``. Setting ``XONSH_DEBUG=1`` now acts like ``XONSH_DEBUG=2`` before (basic information like input transformation, command replacement) and ``XONSH_DEBUG=2`` like ``XONSH_DEBUG=1`` before (more debugging information presented, like PLY parsing messages).
- Cleaned up available aliases for ``shell_type``
- Speedup commands-cache by saving results between runs and use the last run's result
- The ``completer add`` command after the non-exclusive completers.
This means it will not block them from adding their completions.
- Updated the tab-completion tutorial.
- Fixed:
- handle importing/decoding user modules with a 'UTF-8 with BOM' encoding (#4160)
- Fixed XONSH_HISTORY_FILE that has the actual path from the history backend now
- Annotated assignments (``x: int = 42``, ``x: int``).
- Fixed xpip sudo behavior in xonsh AppImage.
- Prevent cancelled future errors for async prompt ($ENABLE_ASYNC_PROMPT) fields from bubbling up (and destroying the prompt's formatting)
- $() no longer silently captures stderr
- Added catching callable argument and raising appropriate exception
- Crashing command-not-found output for bad file names on linux.
- Fixed error message when an empty command is run
- Fixed @$ crash when no output is sent out by the command
- Fixed xonsh crash when launched using `xonsh -c '$("")'`
- now abbrevs callback will not remove word from ``buffer.text``. See https://github.com/xonsh/xonsh/issues/3642#issuecomment-793789741
- Fixed the incorrect SyntaxError that was thrown when a subprocess command was preceded by a comment ending with a colon
- Fixed the missing auto-indentation in readline and prompt_toolkit when a statement ending with a colon was followed by a comment
- Fixed the incorrect auto-indentation in prompt_toolkit when a comment ended with a colon
- Fixed JSON history garbage collection for XONSH_HISTORY_SIZE in seconds.
- Fixed ``skip`` completer (completes ``sudo``, ``which`` and other commands).
- In a subprocess command, having whitespace in between the left bracket and the command no longer raises a SyntaxError.
- Reduced history reading when run script or command. Potential speed increasing.
- Fixed crash on statup if XONSH_COLOR_STYLE is set to something invalid.
- Fixed the colorize and/or keywords.
- Functions can be used for $TITLE, the same way as for $PROMPT. (#4148)
- wsl detection works on archlinux wsl2 now (and hopefully everywhere)
- Fixed an exception when run xonfig wizard in no RC mode.
- Bash completions now handle quoted and space-containing arguments better.
- ``import`` completions always work.
- Test consistent RC loading behaviour in a variety of startup scenarios
- Absolute paths to executables don't break bash completions anymore
- Fix colors and text in the welcome message.
- update to version 0.9.27:
- Added:
- Add new internal command "disown" to remove background jobs from the shell's job list
- Added **xontrib-history-encrypt** - new history backend that encrypt the xonsh shell commands history to prevent leaking sensitive data. If you like the idea give a star to the repository https://github.com/anki-code/xontrib-history-encrypt
- Changed:
- New awesome landing on https://xon.sh - feel free to share and tweet!
- History files (json, sqlite) now have 600 (rw only for user) permission by default.
- PTK(python-prompt-toolkit) is no longer vendored with xonsh.
- Fixed:
- Fixed a bug where "cd" and "rmdir" would return non-directory completions
- SQLite History Backend: show message instead of exiting when disk is full.
- Add '``|``' and '``|=``' operators to the ``Aliases`` class.
- Add tests to the merging functionality.
- Add "back2dir" xontrib (https://github.com/anki-code/xontrib-back2dir) - back to the latest used directory when starting xonsh shell.
- show code-coverage for PRs
- Added ``CommandPipeline.raw_out`` and ``CommandPipeline.raw_err`` to get stdout/err as raw bytes.
- The ``@()`` operator now supports ``bytes`` objects.
- index for history's sqlite-DB
- support passing style from RichCompleter to PTK's Completer
- ``xonsh.cli_utils`` to create cli from functions easily.
- Python API for completer command with ``xonsh.completer`` module functions.
- Added new environment variable ``$PROMPT_TOKENS_FORMATTER``.
That can be used to set a callable that receives all tokens in the prompt template.
It gives option to format the prompt with different prefix based on other tokens values.
Enables users to implement something like [powerline](https://github.com/vaaaaanquish/xontrib-powerline2)
without resorting to separate $PROMPT_FIELDS. Works with ``ASYNC_PROMPT`` as well.
Check the `PR <https://github.com/xonsh/xonsh/pull/3922>`_ for a snippet implementing powerline
- PTK style rules can be defined in custom styles using the ``Token.PTK`` token prefix.
For example ``custom_style["Token.PTK.CompletionMenu.Completion.Current"] = "bg:#ff0000 #fff"`` sets the ``completion-menu.completion.current`` PTK style to white on red.
- Added new environment variable ``XONSH_STYLE_OVERRIDES``. It's a dictionary containing pygments/ptk style definitions that overrides the styles defined by ``XONSH_COLOR_STYLE``.
For example::
$XONSH_STYLE_OVERRIDES["Token.Literal.String.Single"] = "#00ff00" # green 'strings' (pygments)
$XONSH_STYLE_OVERRIDES["completion-menu"] = "bg:#ffff00 #000" # black on yellow completion (ptk)
$XONSH_STYLE_OVERRIDES["Token.PTK.CompletionMenu.Completion.Current"] = "bg:#ff0000 #fff" # current completion is white on red (ptk via pygments)
- support PTK's clipboard integration if pyperclip is installed.
- ``_get_normalized_pstring_quote`` returns a consistent set of prefixes, and the quote, for all path-string variants e.g. inputs ``pr'`` and ``rp'`` both produce the tuple ``("pr", "'")``. This function is used by ``xonsh.completers.complete_path`` and ``xonsh.completers._path_from_partial_string``.
- Added warning about huge amount of commands in CommandsCache that could affect on start speed.
- New ``xonsh.procs`` subpackage for handling subprocess mode.
- Environment variable ``$COMPLETION_MODE`` controls kind of TAB completion used with prompt-toolkit shell.
``default``, the default, retains prior Xonsh behavior: first TAB displays the common prefix of matching completions,
next TAB selects the first or next available completion.
- Added ``xontrib-zoxide`` to the list of xontribs.
- Added ``xontrib-gitinfo`` to the list of xontribs.
- Changed:
- ``CommandPipeline.__repr__`` now returns formatted output wherein its printed
attributes are also repr strings. This improves the output of ``!()``.
- prompt-toolkit required version updated to >=3.0
- group environment variables into categories.
- The SQLite history backend now has the same logic of storing stdout to the memory like json history backend.
- Using ``ujson`` (if installed) in LazyJSON to loading json history 15% faster.
- use requirements.txt env in both CI/local/pre-commit checks
- add caching to CI jobs to improve speed
- The change that allows Nuitka build the xonsh binary.
- Remove ``p``, ``rp`` and ``pr`` prefix from partial p-string used in ``xonsh.completers._path_from_partial_string``, such that ``ast.literal_eval`` does not raise ``SyntaxError``. ``pr`` and ``rp`` strings are now treated internally as raw strings, but the p-string quote is correctly returned.
- Increment the prefix length when the prefix input to ``xonsh.completers.complete_path`` is a p-string. This preserves the length of the prefix for path-string variants.
- Pygments debug messages about cache will be shoen only in debug mode.
- ``ulimit`` builtin now operates on "soft" limits by default.
- tests for vc-branch should accept both master and main
- upgrade black formatter to version 20.8b1
- Use ``xontribs_meta.py`` instead of ``xontribs.json``
- Welcome message cosmetic changes.
- rewrite xontribs/jedi.xsh -> xontribs/jedi.py to take advantage of python tooling
- Deprecated:
- ``PTK_STYLE_OVERRIDES`` has been deprecated, its function replaced by ``XONSH_STYLE_OVERRIDES``
- The ``xonsh.proc`` module has been deprecated. Please use the new
``xonsh.procs`` subpackage instead. Deprecation warnings related to this
have been added.
- Removed:
- The deprecated ``foreground`` decorator has been removed.
Please use ``unthreadable`` instead.
- ``xonsh.proc.unthreadable`` and ``xonsh.proc.uncapturable``
have been moved to ``xonsh.tools``. Please import from
this module instead.
- Fixed:
- Now the directory and the symlink to this directory will be read from PATH once. Increasing the startup speed on Linux.
- Environment variable registration no longer fails to validate when the default
is a callable.
- Default values created from callables are stored on in the evironment.
- Completers also recognize ``:`` as a valid split point for insertion for, e.g. pytest completions
.. code
pytest test_worker::<TAB>
- Colorize ``and``/``or`` operators correctly like ``&&``/``||``
- Speed of CommandsCache increased when aliases have multiple updates (i.e. init conda).
- Now when loading RC files, xonsh will not fail to import modules located on
the same folder.
- Setting an alias with IO redirections (e.g ``ls | wc``) now works correctly.
- PTK shell: ``window has no childres`` error while completion is triggered - https://github.com/xonsh/xonsh/issues/3963
- No longer set `READTHEDOCS=True` for building the documentation, see https://github.com/xonsh/xonsh/issues/3741
- update to version 0.9.20:
- Added:
- ``abbrevs`` expansion now allows for setting cursor to a specific
position within the expanded abbrev. For instance
::
abbrevs["eswap"] = "with ${...}.swap(<edit>):\n "
expands ``eswap`` as you type to environment context manager
``swap()`` syntax and places the cursor at the position of the
``<edit>`` mark removing the mark itself in the process.
- Support for ANSI escape codes in ``$PROMPT``/``$RIGHT_PROMPT``. In this way 3rd party prompt generators like ``powerline`` or ``starship`` can be used to set the prompt. ANSI escape codes might be mixed with the normal formatting (like ``{BOLD_GREEN}``) and *prompt variables* (like ``{user}``) should work as well.
For example:
::
$PROMPT=lambda: $(starship prompt)
$RIGHT_PROMPT="\x1b[33m{hostname} {GREEN}> "
- Added ``$HOSTNAME`` and ``$HOSTTYPE`` environment variables.
- New ``Env.rawkeys()`` iterator for iterating over all keys in an environment,
not just the string keys like with ``__iter__()``.
- New landing page for https://xon.sh
- Added xonsh AppImage to the GitHub release assets
- xonsh now comes with a bulitin version of prompt-toolkit (3.0.5) which will be used as fall back if prompt_toolkit is not installed.
- Support for Python 3.8 PEP 572 assignment expressions (walrus operator).
- Changed:
- custom startup scripts replaced by setup.py -generated (console) entrypoint scripts for both xonsh and xonsh-cat.
This means xonsh.bat and xonsh-cat.bat are replaced on Windows by xonsh.exe and xonsh-cat.exe, respectively.
- Fixed:
- Iterating over ``${...}`` or ``__xonsh__.env`` yields only string
values again.
- List comprehensions do not ignore the second and subsequent ``if`` clauses
in multi-if comprehension expressions any more.
- Xonsh can now fully handle special Xonsh syntax within f-strings, including
environmnent variables within ``${}`` operator and captured subprocess
expansion within f-string expressions.
- Avoid startup error on Windows when py.exe chooses wrong python interpreter to run xonsh.
When multiple interpreters are in PATH, 'py' will choose the first one (usually in the virtual environment),
but 'py -3' finds the system-wide one, apparently by design.
- For xonsh-cat, avoid parsing and processing first (0'th) argument when invoked directly from OS shell.
- Run control files are now read in with ``$THREAD_SUBPROCS`` off.
This prevents a weird error when starting xonsh from Bash (and
possibly other shells) where the top-level xonsh process would
be stopped and placed into the background during startup. It
may be necessary to set ``$THREAD_SUBPROCS=False`` in downstream
xonsh scripts and modules.
- Fixed installation issues where generated files (like the parser table and
amalgamated modules) were not installed.
- The xonsh test suite has been cleaned up. So no more failing test. Hopefully.
- Addressed robustness issue with ``"locked"`` history key not
being present at startup.
- ``vox`` xontrib works again with the new environment defaults.
- update to version 0.9.19:
- Added:
- ``history`` command now supports ``flush`` action
- Added new items on "Bash to xsh" page
- JsonHistory: added ``history gc --force`` switch to allow user to override above warning.
- JsonHistoryGC: display following warning when garbage collection would delete "too" much data and don't delete anything.
"Warning: History garbage collection would discard more history ({size_over} {units}) than it would keep ({limit_size}).\n"
"Not removing any history for now. Either increase your limit ($XONSH_HIST_SIZE), or run ``history gc --force``.",
It is displayed when the amount of history on disk is more than double the limit configured (or defaulted) for $XONSH_HIST_SIZE.
- $LS_COLORS code 'mh' now recognized for (multi) hard-linked files.
- $LS_COLORS code 'ca' now recognized for files with security capabilities (linux only).
- CI step to run flake8 after pytest.
- RichCompletion for completions with different display value, description and prefix_len.
- Allow completer access to multiline document when available via ``xonsh.completers.tools.get_ptk_completer().current_document``.
- ``abbrevs`` word expasion can now be reverted by pressing
the space bar second time immediately after the previous
word got expanded.
- ``ulimit`` command.
- ``pdb`` xontrib, that runs pdb debugger on reception of SIGUSR1 signal.
- xontrib-xpg is a xontrib for running or explaining sql queries for posgresql database.
- Changed:
- Xonsh now launches subprocesses with their ``argv[0]`` argument containing
the command exactly as inserted by the user instead of setting it to the
resolved path of the executable. This is for consistency with bash and other
shells.
- Added ability to register, deregister environment variables;
centralized environment default variables
- Added exit to the "Bash to xsh" article.
- xonsh.main _failback_to_other_shells now tries user's login shell (in $SHELL) before trying system wide shells from /etc/shells.
- The current working directory is now correctly obtained in line 501 of xonsh/parsers/base.py
- Garbage collection avoids deleting history and issues a warning instead if existing history is more than double the comfigured limit.
This protects active users who might have accumulated a lot of history while a bug was preventing garbage collection. The warning
will be displayed each time Xonsh is started until user takes action to reconcile the situation.
- ``tests\test_integrations.py`` no longer runs with XONSH_DEBUG=1 (because new, debug-only progress messages from history were breaking it).
- Updated pytest_plugin for pytest 5.4 API, pip requirements for pytest>= 5.4
- Major improvements to Jedi xontrib completer:
* Use new Jedi API
* Replace the existing python completer
* Create rich completions with extra info
* Use entire multiline document if available
* Complete xonsh special tokens
* Be aware of _ (last result)
* Only show dunder attrs when prefix ends with '_'
- Many files are starting to be formatted using ``pyupgrade --py36-plus``, in order to automatically update to newer
Python constructs.
- ``xontrib load`` does not stop loading modules on error any more.
- Deprecated:
- ``pytest --flake8`` now exits with error message to use flake8 instead.
Allows single list of lint exceptions to apply in CI and your IDE.
- Removed:
- Removed history replay
- pytest-flake8 package from requirements\*.txt
- Xonsh now relies exclusively on Setuptools for install.
- Compatibility with Python 3.5 has been removed as well as all related code. In
particular xonsh.inspector does not defined ``getouterframes`` anymore, use
``inspect.getouterframe`` directly.
- Fixed:
- Unhandled exception triggered by unexpected return from callable alias.
- Fix path completer throwing exception sometimes
- Fixed help operator not displaying definition for callables.
- JsonHistory.files(): Now once again enumerates history files from the directory. This has been broken for about 2 years.
- JsonHistory.run_gc(): Don't busy loop while waiting for history garbage collection to complete, sleep a bit instead.
This does much to keep Xonsh ptk_shell responsive when dealing with very large history on disk.
- Fixed JSON history indexing error.
- Fixed syntax error in scripts containing line continuation syntax.
- $LS_COLORS code 'fi' now used for "regular files", as it should have been all along. (was 'rs')
See (#3608)[https://github.com/xonsh/xonsh/issues/3608].
- pyghooks.color_files now follows implememntation of ls --color closely. Thanks @qwenger!
However, a few documented differences remain due to use in Xonsh.
- $LS_COLORS['ln'] = 'target' now works. Also fixes #3578.
- Fixed exit code for commands executed via ``-c`` (#3402)
- Logical subprocess operators now work after long arguments (e.g. ``--version``).
- ``pip`` completer no longer erroneously fires for ``pipx``
- Updated development guide to reference flake8 instead of pylint
- Corrected flake8 config for allowed exceptions.
- various pytest warnings in a "clean" test run.
- The current Mercurial topic is shown.
- Fixed import problems due to modules using deprecated pkg_resources methods by proxying calls to the underlying loader.
- Typo in 'source' alias.
- Crash in 'completer' completer.
- Don't complete unnecessarily in 'base' completer
- external *xontrib-hist-navigator* to facilitate directory history navigation.
- Support package prompt-toolkit V3 as well as V2 in prompt_toolkit shell.
- New `xontrib-output-search <https://github.com/anki-code/xontrib-output-search>`_ to get identifiers, names, paths, URLs and words from the previous command output and use them for the next command.
- New `xontrib-pipeliner <https://github.com/anki-code/xontrib-pipeliner>`_ is to easily process the lines using pipes.
- New `xontrib-prompt-bar <https://github.com/anki-code/xontrib-prompt-bar>`_ with elegance bar style for prompt.
- Changed:
- $SHELL_TYPE "prompt_toolkit" with any suffix creates the "prompt_toolkit" shell, requires package prompt-toolkit >= 2.0
- Moved code from package xonsh.ptk2 to xonsh.ptk_shell (because it's the only one now); package xonsh.ptk2 redirects thence.
- Added extremely simplified xonsh AppImage building process.
- Added examples of usage $XONSH_TRACE_SUBPROC to the docs
- Use UTF-8 encoding when writing .xonshrc with webconfig for Windows compatibility
- Deprecated:
- prompt-toolkit versions before 2.0
- Removed:
- package xonsh.ptk
- Fixed:
- Fixed name autosuggestion in path completer (#3519)
- Added building process of standalone rootless AppImage for xonsh.
- pyproject.toml -- so vscode can use black as python formatter interactively
- The ``xonsh/interactive`` container has been added, in addition to the previous ``xonsh/xonsh`` and ``xonsh/action`` containers. See https://hub.docker.com/u/xonsh
- New ``$THREAD_SUBPROCS`` environment variable allows you to
specify whether threadable subprocesses should actually be
run in a thread or not. Default ``True``.
- event on_lscolors_changed which fires when an item in $LS_COLORS changed.
- dict pyghooks.file_color_tokens containing color tokens for file types defined in $LS_COLORS.
- file pyproject.toml containing config rules for black formatter consistent with flake8
- New ``umask`` utility to view or set the file creation mask
- New ``xonfig web`` command that launches a web UI (in your browser) that
allows users to configure their ``$XONSH_COLOR_STYLE``, ``$PROMPT``, and
loaded xontribs in an interactive way. This is the prefered way to initialize
the ``~/.xonshrc`` file on a new system or for new users. It supersedes the
old ``xonfig wizard`` command.
- New ``xonsh.webconfig`` subpackage for creating and launching ``xonfig web``.
- Added ``localtime`` entry to the ``$PROMPT_FIELDS`` dictionary, allowing users
to easily place the current time in their prompt. This can be formatted with
the ``time_format`` entry of ``$PROMPT_FIELDS``, which defaults to ``"%H:%M:%S"``.
These are implemented in the new ``xonsh.prompt.times`` module.
- The ``html`` module in ``xonsh.lazyimps`` was added to lazily import
``pygments.formatters.html``.
- New ``xonsh.pyghooks.XonshHtmlFormatter`` class that enables HTML formatting of
xonsh color strings.
- Changed:
- the feature list: subprocess mode colorizes files per $LS_COLORS, when they appear as arguments in the command line.
Yet another approximation of ls -c file coloring behavior.
- file setup.cfg to declare flake8 rules for all tools (not just pytest)
- Moved python 3.8 parsing out of base parser
- The ``xonsh.pyghooks.XonshLexer`` now inherits from ``Python3Lexer``,
rather than ``PythonLexer``.
- ``xonsh.pyghooks.XonshStyle`` now presents the ``highlight_color`` and
``background_color`` from the underlying style correctly.
- Removed:
- Removed deprecated ``xonda`` ``xontrib`` from list
- ``xonsh.lib.itertools.as_iterable`` for making sure that strings are turned into iterables
- The ``percol`` command no longer predicts as threadable.
- Changed:
- The ``source`` alias is now unthreaded, enabling ``contextvars`` to be used
correctly in sourced files.
- Changed the ``ExecAlias`` to only be applied when the logical operators
(``and``, ``or``) are surrounded by whitespace.
- Fixed:
- Fixed missing ANSI color modifiers which causes traceback when they were used by ``$LS_COLORS``.
- gray empty bottom bar when using $XONSH_UPDATE_PROMPT_ON_KEYPRESS
- ``xonsh.lib.subprocess.check_output()`` now properly captures output.
- Correct ANSI colors for the default color scheme to stop suppressing the bold / italic / underline modifiers.
- tab completion for cd correctly handles the CDPATH environment variable
- On Windows, send ``CTRL_C_EVENT`` to subprocesses instead of ``SIGINT``.
- ``xonsh`` will return a non-zero exit code if it is run in file mode and
cannot find the file specified, e.g.
.. code-block::
$ xonsh thisfiledoesntexist.xsh
xonsh: thisfiledoesntexist.xsh: No such file or directory.
$ _.returncode
1
- Fixed issue with Jedi xontrib incorrectly raising errors
during tab completion.
- Defining functions inside of the shell no longer crashes on Python 3.8.
- The encoding for xonsh script are now always assumed to be utf-8, even on
Windows where the default encoding can be different. This allows for writing
real unicode characters in the xonsh script files.
- update to version 0.9.11:
- Changed:
- ``vox activate`` will now prepend the absolute path of the virtualenv ``bin/`` directory (or ``Scripts/`` on Windows) to ``$PATH``; before this was a relative path.
- Fixed:
- "lou carcolh" example and description of ``endidx`` in completer tutorial
- Logical operators in aliases are now executed as expected, e.g.
``aliases['echocat'] = 'echo "hi" and echo "there"'`` will, when run, return
- $COMPLETION_IN_THREAD: When this is True, background theads is used for completion.
- Open man page when requesting help for subprocess commands, e.g. using ``sh?``
- Add several cmds/tools for predict list
- Changed:
- Changed ``XonshSession.link_builtins`` to set a ``DynamicAccessProxy`` for each ``builtin`` link
- ``events`` is now unlinked from ``builtins``
- Removed:
- Removed ``DeprecationWarningProxy``; no longer needed
- Removed ``load_proxies`` and ``unload_proxies``; moved functionality to ``XonshSession.link_builtins``, ``XonshSession.unlink_builtins``, respectively.
- Removed deprecated ``builtin.__xonsh_*__`` alises, please use ``builtins.__xonsh__.*`` instead.
- Fixed:
- Added proxied ``__dir__`` method to ``DynamicAccessProxy`` to restore
tab-completion for objects that use the proxy (especially ``events``)
- Avoid displaying finished tasks in title.
- ``inspect.getsource`` now works correctly and the ``__xonsh__.execer`` resets
``<filename>`` correctly. This was causing several very strange buggy
behaviors.
- Hitting ``Enter`` while ``$VI_MODE=True`` now executes the current code block
* New xonsh standard library ``xonsh.lib`` subpackage
* ``xonsh.lib.os.indir`` a context manager for temporarily entering into a directory
* ``xonsh.lib.subprocess.run`` and ``xonsh.lib.subprocess.check_call``
subprocess stubs using ``xonsh`` as the backend
* Fixed:
* update xoreutils._which.which() for python 3.x support.
* Fixed issue with incorrect strip lengths for prefixes with quotes in them
* Fixed bash script to also consider leading double quotes and not just single
quotes
* Launching xonsh with prompt_toolkit version 2.x no longer fails, and instead fallsback to readline shell. This is a patch for until prompt_toolkit 2.x support is fully implemented. See PR #2570
- update to version 0.6.8:
* Fixed:
* completions relative to ``CDPATH`` only trigger when used with ``cd``
* Import of ``ctypes.util`` is now explictly performed, as needed.
Python v3.7 no longer imports this module along with ``ctypes``.
* Fixed issue with pygments-cache not properly generating a cache the first
time when using prompt-toolkit. This was due to a lingering lazy import
of ``pkg_resources`` that has been removed.
* Removed duplicate ``pip`` completer
* ``bash_completion`` no longer returns invalid prefix lengths for directories
containing escape file names
* Fixed error when using redirection (e.g., >) on Windows.
- update to version 0.6.7:
* Changed:
* Xonsh live example has been re-added back to the documentation.
* Fixed:
* Fixed issue where xonsh would fail to properly return the terminal prompt
(and eat up 100% CPU) after a failed subprocess command in interactive mode
if ``$RAISE_SUBPROC_ERROR = True``.
* ``xonsh.tokenize.tok_name`` no longer mutates the standard library ``tokenize.tok_name``.
* Release tarballs now include licenses and minimal documentation for xonsh and ply
* Wizard now has a FileInserter node that allows blocks to be inserted and replaced inside of a file. This adheres to conversion rules fordumping as provided on this node.
* New xonsh.wizard.StateVisitor.flatten() method for flattening the current state.
* Changed:
* The xonsh startup wizard will only be triggered if no xonshrc files exist and the file ~/.local/config/xonsh/no-wizard is not present.
* The xonfig wizard command will now run write out to the xonshrc file.
* Wizard nodes Save and Load had their names changed to SaveJSON and LoadJSON.
* Removed:
* Static configuration is dead (config.json), long live run control (xonshrc)!
* The following evironment variables have been removed as they are no longer needed: $LOADED_CONFIG and $XONSHCONFIG.
* Many support functions for static configuration have also been removed.
* Fixed:
* Files starting with # are auto-escaped by TAB completion
* Tab completion xontrib for python applications based on click framework.
* Added on_transform_command event for pre-processing that macros can't handle.
* Autodetection of backgroundability by binary analysis on POSIX.
* New argument expand_user=True to tools.expand_path.
* New $COMPLETION_QUERY_LIMIT environment variable for setting the number of completions above which the user will be asked if they wish to see the potential completions.
* Users may now redirect stdout to stderr in subprocess mode.
- Changed:
* The Block and Functor context managers from xonsh.contexts have been rewritten to use xonsh's macro capabilities. You must now enter these via the with! statement, e.g. with! Block(): pass.
* The distributed xontrib now needs to use the with! statement, since it relies on Functor.
* telnet has been flagged as unthreadable.
* When $DYNAMIC_CWD_ELISION_CHAR is non empty and the last dir of cwd is too long and shortened, the elision char is added at the end.
* pygments is no longer a strict dependency of the prompt_toolkit backend. If pygments is not installed, the PTK backend will use the default ansi color settings from the terminal. Syntax highlighting requires that pygments is installed.
* Events are now keyword arguments only
* Restored on_precommand to its original signature.
* Move built_ins.expand_path to tools.expand_path.
* Rename tools.expandpath to tools._expandpath.
* Added gvim command to unthreadable predictors.
* The source alias now passes $ARGS down to file it is sourcing.
- Removed:
* XonshBlockError has been removed, since it no longer serves a purpose.
- Fixed:
* PopenThread will now re-issue SIGINT to the main thread when it is recieved.
* Fixed an issue that using sqlite history backend does not kill unfinished jobs when quitting xonsh with a second "exit".
* Fixed an issue that xonsh would fail over to external shells when running .xsh script which raises exceptions.
* Fixed an issue with openpty() returning non-unix line endings in its buffer. This was causing git and ssh to fail when xonsh was used as the login shell on the server. See https://mail.python.org/pipermail/python-list/2013-June/650460.html for more details.
* Restored the ability to ^Z and fg processes on posix platforms.
* CommandPipelines were not gauranteeded to have been ended when the return code was requested. This has been fixed.
* Introduce path expansion in is_writable_file to fix $XONSH_TRACEBACK_LOGFILE=~/xonsh.log.
* Backgrounding a running process (^Z) now restores ECHO mode to the terminal in cases where the subprocess doesn't properly restore itself. A major instance of this behaviour is Python's interactive interpreter.
* Readline backend would not ask the user to confirm the printing of completion options if they numbered above a certain value. Instead they would be dumped to the screen. This has been fixed.
* Jupyter kernel was no longer properly running subprocess commands. This has been fixed.
* The filename is applied to the target of the source alias, providing better tracebacks.
* $DYNAMIC_CWD_ELISION_CHAR environment variable to control how a shortened path is displayed.
- Changed:
* _ret_code function of prompt_ret_code xontrib return now None when return code is 0 instead of empty string allowing more customization of prompt format.
- Fixed:
* Minor Python completer token counting bug fix.
* multiline syntax error in PTK shell due to buffer not being reset
* Segfaults and other early exit signals are now reported correctly, again.