Xonsh

Latest version: v0.16.0

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

Scan your dependencies

Page 10 of 20

0.8.9

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

**Added:**

* New ``env_prefix`` & ``env_postfix`` prompt fields for rendering the pre- and
post-fix characters of the an active virtual environment.
* ON_WSL attribute in platform.py
* Rendering of ``{env_name}`` in ``$PROMPT`` is now suppressed if
the ``$VIRTUAL_ENV_DISABLE_PROMPT`` environment variable is
defined and truthy.
* Rendering of ``{env_name}`` in ``$PROMPT`` is now overridden by
the value of ``str($VIRTUAL_ENV_PROMPT)`` if that environment variable
is defined and ``not None``. ``$VIRTUAL_ENV_DISABLE_PROMPT`` takes precedence
over ``$VIRTUAL_ENV_PROMPT``.
* A xontrib which adds support for `direnv <https://direnv.net/>`_

**Changed:**

* ``env_name`` prompt field now looks up the pre- and post-fix characters,
rather than relying on hard-coded values.
* Some minor ``history show`` efficiency improvements.
* If we are on wsl, avoid to use xonsh_preexec_fn when pipe.

**Fixed:**

* Made ``$PATH`` searching more robust to broken symlinks on Windows.
* undesirable SIGSTOP by putting in a SIGCONT
* Fixed issue with recursive aliases not being passed all keyword arguments
that are part of the callable alias spec. This allows commands like
``aliases['hsa'] = "history show all"; hsa | head`` to no longer fail
with strange errors.

**Authors:**

* Anthony Scopatz
* Sagar Tewari
* Brian Skinn
* Yohei Tamura
* anatoly techtonik
* 74th
* Chad Kennedy

0.8.8

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

**Added:**

* ``vox new`` has an added ``-p --interpreter`` flag for choosing the Python interpreter to use for virtualenv creation
* The default Python intrepreter vox uses to create virtual environments can be set using the ``$VOX_DEFAULT_INTERPRETER`` environment variable.


**Changed:**

* ``lib.ChainDB`` now resolves results to the type of the inputs if possible

0.8.7

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

**Added:**

* New xonsh syntax ``pf`` strings -- combining path strings with f-strings.

Usage:

.. code-block:: bash

gilbad_cat ~ $ repos = 'github.com'
gilbad_cat ~ $ pf"~/{repos}"
PosixPath('/home/gil/github.com')
gilbad_cat ~ $ pf"{$HOME}"
PosixPath('/home/gil')
gilbad_cat ~ $ pf"/home/${'US' + 'ER'}"
PosixPath('/home/gil')


**Fixed:**

* Set ``ls`` to ``predict_true`` in ``default_threadable_predictors``. This prevents ``ls`` on OSX
from being flagged on OSX as unthreadable (incorrectly) because it relies on ``ncurses``.

0.8.6

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

**Added:**

* Doco about how to update xonsh and how to set and unset environment variables


**Fixed:**

* Updated behavior of the ``cat`` coreutils function so that it properly
handles as vareity of cases such as:

* Exits after concatenating normal files which have a finite size
* Continues to run for special files which do not have a size,
such as ``/dev/random``
* Is interruptable in all cases with Crtl-C.
* Callable aliases were not properly raising a ``CalledProcessError`` when they
returned a non-zero exist status when ``$RAISE_SUBPROC_ERROR = True``. This has
been fixed.
* Fixed interpretation of color names with PTK2 and Pygments 2.3.1.

0.8.5

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

**Added:**

* Add alias to `base16 shell <https://github.com/chriskempson/base16-shell>`_

* Installation / Usage
1. To install use pip

.. code-block:: bash

python3 -m pip install xontrib-base16-shell

2. Add on ``~/.xonshrc``

.. code:: xonsh
:number-lines:

$BASE16_SHELL = $HOME + "/.config/base16-shell/"
xontrib load base16_shell


3. See image

.. image:: https://raw.githubusercontent.com/ErickTucto/xontrib-base16-shell/master/docs/terminal.png
:width: 600px
:alt: terminal.png

* New ``DumbShell`` class that kicks in whenever ``$TERM == "dumb"``.
This usually happens in emacs. Currently, this class inherits from
the ``ReadlineShell`` but adds some light customization to make
sure that xonsh looks good in the resultant terminal emulator.
* Aliases from foreign shells (e.g. Bash) that are more than single expressions,
or contain sub-shell executions, are now evaluated and run in the foreign shell.
Previously, xonsh would attempt to translate the alias from sh-lang into
xonsh. These restrictions have been removed. For example, the following now
works:

.. code-block:: sh

$ source-bash 'alias eee="echo aaa \$(echo b)"'
$ eee
aaa b

* New ``ForeignShellBaseAlias``, ``ForeignShellFunctionAlias``, and
``ForeignShellExecAlias`` classes have been added which manage foreign shell
alias execution.


**Changed:**

* String aliases will now first be checked to see if they contain sub-expressions
that require evaluations, such as ``(expr)``, ``$[cmd]``, etc. If they do,
then an ``ExecAlias`` will be constructed, rather than a simple list-of-strs
substitutiuon alias being used. For example:

.. code-block:: sh

$ aliases['uuu'] = "echo ccc $(echo ddd)"
$ aliases['uuu']
ExecAlias('echo ccc $(echo ddd)\n', filename='<exec-alias:uuu>')
$ uuu
ccc ddd

* The ``parse_aliases()`` function now requires the shell name.
* ``ForeignShellFunctionAlias`` now inherits from ``ForeignShellBaseAlias``
rather than ``object``.


**Fixed:**

* Fixed issues where the prompt-toolkit v2 shell would print an extra newline
after Python evaluations in interactive mode.

0.8.4

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

**Added:**

* Added the possibility of arbitrary paths to the help strings in ``vox activate`` and
``vox remove``; also updated the documentation accordingly.
* New ``xonsh.aliases.ExecAlias`` class enables multi-statement aliases.
* New ``xonsh.ast.isexpression()`` function will return a boolean of whether
code is a simple xonsh expression or not.
* Added top-level ``run-tests.xsh`` script for safely running the test suite.


**Changed:**

* String aliases are no longer split with ``shlex.split()``, but instead use
``xonsh.lexer.Lexer.split()``.
* Update xonsh/prompt/cwd.py _collapsed_pwd to print 2 chars if a directory begins with "."
* test which determines whether a directory is a virtualenv

previously it used to check the existence of 'pyvenv.cfg'
now it checks if 'bin/python' is executable


**Fixed:**

* Fixed issue with ``and`` & ``or`` being incorrectly tokenized in implicit
subprocesses. Auto-wrapping of certain subprocesses will now correctly work.
For example::

$ echo x-and-y
x-and-y
* Fix EOFError when press `control+d`
* fix no candidates if no permission files in PATH
* Fixed interpretation of color names with PTK2 and Pygments 2.3.
* Several ResourceWarnings: unclosed file in tests
* AttributeError crash when using --timings flag
* issue 2929

Page 10 of 20

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.