Xonsh

Latest version: v0.16.0

Safety actively analyzes 638437 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 20

0.9.26

====================

**Added:**

* abbrevs now support callbacks
* Added a new xontrib ``tcg``

**Fixed:**

* now xonsh stdout delegates ``isatty`` to wrapped io stream.

**Authors:**

* Gil Forsyth
* anki-code
* Noortheen Raja
* Gao, Xiang

0.9.25

====================

**Added:**

* VC_GIT_INCLUDE_UNTRACKED environment variable if untracked file changes are desired to show a dirty working directory
* added `xontrib-powerline2 <https://github.com/vaaaaanquish/xontrib-powerline2>`_
* 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.
So that some common emacs like
`cut/copy <https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/examples/prompts/system-clipboard-integration.py>`_
will work out of the box.
* Added Python 3.9 to continuous integration.
* ``open in google cloud shell`` button 🤩
* Respect ignorespace present in $HISTCONTROL
* ``_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.
``menu-complete`` enables TAB behavior like ``readline`` command ``menu-complete``. First TAB selects the first matching
completion, subsequent TABs cycle through available completions till the last one. Next TAB after that displays
the common prefix, then the cycle repeats.
* Added timing probes for prompt tokens, lexer and before prompt.
* improve github actions by adding cache
* ``xog`` xontrib - a simple command to establish and print temporary traceback
log file.
* Added ``xontribs`` section to the ``xonfig``.
* added xontrib-avox-poetry(http://github.com/jnoortheen/xontrib-avox-poetry)
* added xontrib-broot(http://github.com/jnoortheen/xontrib-broot)
* added `xontrib-long-cmd-durations <https://github.com/jnoortheen/xontrib-cmd-durations>`_
* added `xontrib-commands <https://github.com/jnoortheen/xontrib-commands>`_
* added xontrib-powerline3(http://github.com/jnoortheen/xontrib-powerline3)
* 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
* make_xontrib - typerror - https://github.com/xonsh/xonsh/issues/3971
* Fix libc detection on FreeBSD
* Fix uptime functionality on FreeBSD
* Updated History Backend tutorial.
* enabled flake8 warning on ambiguous names. it is fun naming variables in coded words until oneday it looks like encrypted.
* Added ANSI fallback for ``xonsh.tools.print_color`` if shell is not yet initialized. Fixes 3840.
* ``./run-tests.xsh`` without arguments previously gave an esoteric error. It
now prints help on how to run the tests.
* The git customisation example in the .xonshrc docs uses the right module name

**Authors:**

* Anthony Scopatz
* Jamie Bliss
* a
* David Strobach
* Bob Hyman
* anki-code
* Gyuri Horak
* Noortheen Raja
* Carmen Bianca Bakker
* Danny Sepler
* vaaaaanquish
* Daniel Shimon
* Jerzy Drozdz
* Faris A Chugthai
* Asaf Fisher
* Dominic Ward
* omjadas
* Leandro Emmanuel Reina Kiperman
* Henré Botha
* Aneesh Durg
* colons
* yggdr

0.9.24

====================

**Added:**

* Ability to register custom styles via ``xonsh.pyghooks.register_custom_style``
* Add method of escaping an environment variable from expansion to the Bash to Xonsh Translation Guide.
* added mypy to the project. many of the errors are ignored. but it is a start.
* Added example of subproc calling to the tutorial.
* New xontrib-sh (https://github.com/anki-code/xontrib-sh) to paste and run snippets from bash, zsh, fish.

**Changed:**

* Now ``COMPLETIONS_CONFIRM`` is ``True`` by default.
* ``xonsh.AppImage`` python version pinned to 3.8.
* Cookiecutter template to creating new xontribs has many improvements (https://github.com/xonsh/xontrib-cookiecutter).
* Docs sections improvement.

**Removed:**

* Removed ``import random``.

**Fixed:**

* 1207 - custom color themes
* Webconfig updarted for the ``NO_COLOR`` to ``RESET`` change.
* async prompt field's returns from earlier data
* Async prompt will now support nested-format strings in prompts
* handle None value for ASYNC_PROMPT_THREAD_WORKERS
* Fixed f-strings parsing in Python 3.9
* Fixed reset color in ``xontrib list``.
* Fixed NO_COLOR to RESET in prompt_ret_code and mplhooks.

**Authors:**

* Anthony Scopatz
* David Strobach
* a
* anki-code
* Gyuri Horak
* Noortheen Raja
* Will Shanks

0.9.23

====================

**Added:**

* add API docs for ptk_shell.updator module
* add flake8-docstrings to the project. it integrates pydocstyle to flake8.
* Support for ANSI OSC escape sequences in ``$PROMPT``, setting ``$TITLE`` for example. (374, 1403)
* Now ptk_shell supports loading its sections in thread, speeding up the prompt. Enable it by setting ``$ENABLE_ASYNC_PROMPT=True``.
* Added ``unset``, ``export``, ``set -e``, ``set -x``, ``shopt``, ``complete`` to xontrib bashisms.
* Use command_cache when finding available commands, to speedup command-not-found suggestions
* Added Visual Studio Code (VSCode) extension and Vim syntax file to the Editors page.
* Added ``exit(exit_code)`` function by default in not interactive mode. Now importing ``exit`` from ``sys`` is not needed.
* Added Python syntax highlighting of xsh files on Github repo xonsh/xonsh
* history clear, history off and history on actions, for managing whether history in the current session is saved.
* ValueErrors from environ.register now report the name of the bad env var
* Add a new color ``DEFAULT`` that is used to designate the terminal's default color.
* Add a new special color token ``RESET`` used to reset all attributes.
* Add a new xonsh tool 'print_warning' that prints a traceback with a warning message.
* Added `xontrib-onepath <https://github.com/anki-code/xontrib-onepath>`_ to associate files with apps in xonsh shell like in graphical OS.
* Added ``print_color`` and ``printx`` functions to builtins as reference to ``xonsh.tools.print_color``.
* Added to xontrib whole_word_jumping: Shift+Delete hotkey to delete whole word.
* Added "Advanced String Literals" to the "Tutorial".
* ``xonfig jupyter-kernel`` new subcommand to generate xonsh kernel spec for jupyter.
Installing a new xonsh kernel for jupyter automatically removes any other one registered with jupyter,
otherwise the new one might not be used.
* Added xontrib ``powerline-binding`` (https://github.com/dyuri/xontrib-powerline-binding) - uses ``powerline`` to render the prompt.

**Changed:**

* Improved printing of xonsh ``--shell-type`` argument in help message.
* "Bash to Xonsh Translation Guide" improvements.
* More stable exception handling in the tab completer.
* Changed sections order in docs
* The ``path`` type in ``${...}.register`` was renamed to ``env_path`` as it should be and added
new ``path`` type instead that represent ``pathlib.Path``. Now you can register typed environment
variables that will be converted to ``Path``.
* xonsh/environ.py: new rule: for "registered" environment variables (in ``DEFAULT_VARS`` or via ``env.register()``),
if default is set to ``DefaultNotGiven``, then variable has no default and raises ``KeyError`` if it is not
actually defined in environment. Likewise, ``"var" in __xonsh__.env`` will return False.
* Changed defaults for ANSICON, TERM and VIRTUAL_ENV to ``DefaultNotGiven``, so code can rationally test whether
the expected external program has defined these variables. No need to do this for variables that xonsh
itself defines.
* Moved internal uses of ``NO_COLOR`` to ``RESET``.
* When retrieving the git status or other fields for building the prompt xonsh will run
the git commands with ``$GIT_OPTIONAL_LOCKS=0``. For details on what this entails see
the git documentation for
`GIT_OPTIONAL_LOCKS <https://git-scm.com/docs/git#Documentation/git.txt-codeGITOPTIONALLOCKScode/>`_.
* Minor improvements to the get prompt speed. (Mostly in git.)
* ptk key binding for TAB -- hitting TAB to start completion now automatically selects the first displayed completion (if any).
hitting TAB when in insert mode inserts TAB, as heretofore. This more exactly follows behavior of readline ``menu-complete``.
There is no configuration option for tailoring this behavior.
* ``xonfig info`` displays whether jupyter detected in environment and
also path of xonsh jupyter kernel spec, if any.
* xontrib-argcomplete and xontrib-pipeliner description improvement.

**Deprecated:**

* Deprecated the ``NO_COLOR`` color reset token in favor of ``RESET``.

**Removed:**

* Deprecated ``--config-path`` argument suppressed from help.
* setup no longer (tries to) install jupyter kernel automatically,
user must run ``xonfig jupyter-kernel`` manually.

**Fixed:**

* cygwin needs full path to find exe; disable thread_subprocs as default for cygwin
* Fixed logic in git dirty working directory
* Fixed type registration for ``*DIRS`` environment variables.
* Fixed 3703 and 3739, recent code change made it impossible to tell whether a (registered) environment variable
was missing from environment or present and set to its registered default value. The test for ANSICON was
failing due to this.
* Fixed environment variables substitution: unknown variables stay unreplaced now (3818).
* Fixed xpg xontrib link
* Fix crash when xonsh tries to run windows app execution aliases.
* Setup wasn't consistently detecting jupyter in environment; ``python setup.py install`` worked, but
``pip install .`` wouldn't (because pip mucks with ``sys.path``),
nor would install from wheel (because it doesn't run ``setup.py``).
* ``xonfig info`` now displays actual value of ON_MSYS and ON_CYGWIN instead of lazy bool type.
(maybe was happening only on Windows?)

**Authors:**

* Anthony Scopatz
* Gil Forsyth
* Morten Enemark Lund
* Bob Hyman
* a
* anki-code
* christopher
* Eadaen1
* Danny Sepler
* Gyuri Horak
* cafehaine
* Wendell Turner
* Noortheen Raja
* Marius van Niekerk
* Wendell CTR Turner

0.9.22

====================

**Added:**

* Added xontrib-argcomplete to support kislyuk/argcomplete - tab completion for argparse.
* New ``tools.debian_command_not_found()`` function for finding commands in
debian/ubuntu packages.
* New ``tools.conda_suggest_command_not_found()`` function for finding commands in
conda packages.
* Borrow shift-selection from prompt-toolkit. Shift-arrow (selects a letter) and control-shift-arrow (selects a word) should now be supported.
* Documentation for keyboard shortcuts
* Xonsh now supports bash-style variable assignments preceding
subprocess commands (e.g. ``$FOO="bar" bash -c r"echo $FOO"``).

**Changed:**

* Added the fastest way to run xonsh AppImage to the docs.
* ``command_not_found()`` is now a wrapper function that finds packages for missing
commands in a variety of locations. This function now also takes an ``env`` argument
for looking up values in the enviornment.
* The variable cwd_dir, used for prompts,
now always has a slash at the end, so users can use the
construct "{cwd_dir}{cwd_base}" in their custom prompt definitions.

**Fixed:**

* crash when starting wizard by ``xonfig wizard``
xonsh.environ: ensure get_docs(name).doc_default is str when name is not registered.
* Fixed issue where xontribs were failing from ``AttributeError: '_MergedKeyBindings' object has no attribute 'add'``

**Authors:**

* Anthony Scopatz
* David Strobach
* Bob Hyman
* anki-code
* Danny Sepler
* Eadaen1

0.9.21

====================

**Added:**

* ``xonsh-in-docker.py`` script now has ``--pytest`` parameter,
that automates pytest installation into the Docker container.
* Setup extras tag '[full]' to install prompt-toolkit and pygments in one fell swoop.
Full feature install can be ``pip install xonsh[full]``.
* Support for PEP 570 positional-only parameters.
* Support for starred expressions within return statement
(``return x, *my_list``).
* Xonsh now runs in Python 3.9
* ``vox`` xontrib now supports ``new --activate`` and ``deactivate --remove``
to create + activate and deactivate + remove virtual environments in a single
command.

**Changed:**

* Rewrote Installation and Configuration sections of Getting Started doc
to clarify install from packages, and generally improve flow.

**Fixed:**

* Fixed incorrect reference to XONSH_HIST_SIZE instead of XONSH_HISTORY_SIZE
* RST code-block:: xonshcon now works.
* Non-default parameters can not follow defaults anymore.
* Fixed parser not emmiting errors in some cases.

**Authors:**

* Anthony Scopatz
* Jamie Bliss
* David Strobach
* Bob Hyman
* Will S
* Danny Sepler
* Marius van Niekerk

Page 5 of 20

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.