Xonsh

Latest version: v0.17.0

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

Scan your dependencies

Page 19 of 20

0.3.4

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

**Changed:**

* ``$PROMPT`` from foreign shells is now ignored.
* ``$RC_FILES`` environment variable now stores the run control files we
attempted to load.
* Only show the prompt for the wizard if we did not attempt to load any run
control files (as opposed to if none were successfully loaded).
* Git and mercurial branch and dirty function refactor to improve run times.


**Fixed:**

* Fixed an issue whereby attempting to delete a literal value (e.g., ``del 7``)
in the prompt_toolkit shell would cause xonsh to crash.
* Fixed broken behavior when using ``cd ..`` to move into a nonexistent
directory.
* Partial workaround for Cygwin where ``pthread_sigmask`` appears to be missing
from the ``signal`` module.
* Fixed crash resulting from malformed ``$PROMPT``.
* Fixed regression on Windows with the locate_binary() function.
The bug prevented `source-cmd` from working correctly and broke the
``activate``/``deactivate`` aliases for the conda environments.
* Fixed crash resulting from errors other than syntax errors in run control
file.
* On Windows if bash is not on the path look in the registry for the defaults
install directory for GitForWindows.

0.3.3

====================
**Added:**

* Question mark literals, ``?``, are now allowed as part of
subprocess argument names.
* IPython style visual pointer to show where syntax error was detected
* Pretty printing of output and syntax highlighting of input and output can now
be controlled via new environment variables ``$COLOR_INPUT``,
``$COLOR_RESULTS``, and ``$PRETTY_PRINT_RESULTS``.

* In interactive mode, if there are stopped or background jobs, Xonsh prompts
for confirmations rather than just killing all jobs and exiting.

**Changed:**

* ``which`` now gives a better verbose report of where the executables are
found.
* Tab completion now uses a different interface, which allows new completers
to be implemented in Python.
* Most functions in the ``Execer`` now take an extra argument
``transform``, indicating whether the syntax tree transformations should
be applied.
* ``prompt_toolkit`` is now loaded lazily, decreasing load times when using
the ``readline`` shell.
* RC files are now executed directly in the appropriate context.
* ``_`` is now updated by ``![]``, to contain the appropriate
``CompletedCommand`` object.



**Removed:**

* Fixed bug on Windows where ``which`` did not include current directory

**Fixed:**

* Fixed crashed bash-completer when bash is not available on Windows
* Fixed bug on Windows where tab-completion for executables would return all files.
* Fixed bug on Windows which caused the bash $PROMPT variable to be used when no
no $PROMPT variable was set in .xonshrc
* Improved start-up times by caching information about bash completion
functions
* The --shell-type CLI flag now takes precedence over $SHELL_TYPE specified in
.xonshrc
* Fixed an issue about ``os.killpg()`` on OS X which caused xonsh crash with
occasionally.

0.3.2

====================
**Fixed:**

* Fixed PermissionError when tab completions tries to lookup executables in
directories without read permissions.
* Fixed incorrect parsing of command line flags

0.3.1

====================
**Added:**

* When a subprocess exits with a signal (e.g. SIGSEGV), a message is printed,
similar to Bash.
* Added comma literals to subproc mode.
* ``$(cmd)`` has been added as a subprocess-mode operator, which replaces in
the subprocess command itself with the result of running ``cmd``.
* New ``showcmd`` alias for displaying how xonsh interprets subprocess mode
commands and arguments.
* Added ``$DYNAMIC_CWD_WIDTH`` to allow the adjusting of the current working
directory width in the prompt.
* Added ``$XONSH_DEBUG`` environment variable to help with debugging.
* The ``${...}`` shortcut for ``__xonsh_env__`` now returns appropriate
completion options

**Changed:**

* On Windows the default bash completions files ``$BASH_COMPLETIONS`` now points
to the default location of the completions files used by 'Git for Windows'
* On Cygwin, some tweaks are applied to foreign shell subprocess calls and the
readline import, in order to avoid hangs on launch.


**Removed:**

* Special cased code for handling version of prompt_toolkit < v1.0.0


**Fixed:**

* Show sorted bash completions suggestions.
* Fix bash completions (e.g git etc.) on windows when completions files have
spaces in their path names
* Fixed a bug preventing ``source-bash`` from working on Windows
* Numerous improvements to job control via a nearly-complete rewrite.
* Addressed issue with finding the next break in subproc mode in context
sensitive parsing.
* Fixed issue with loading readline init files (inputrc) that seems to be
triggered by libedit.
* ``$MULTILINE_PROMPT`` now allows colors, as originally intended.
* Rectified install issue with Jupyter hook when installing with pyenv,
Jupyter install hook now respects ``--prefix`` argument.
* Fixed issue with the xonsh.ply subpackage not being installed.
* Fixed a parsing bug whereby a trailing ``&`` on a line was being ignored
(processes were unable to be started in the background)

0.3.0

====================
**Added:**

* ``and``, ``or``, ``&&``, ``||`` have been added as subprocess logical operators,
by popular demand!
* Subprocesses may be negated with ``not`` and grouped together with parentheses.
* New framework for writing xonsh extensions, called ``xontribs``.
* Added a new shell type ``'none'``, used to avoid importing ``readline`` or
``prompt_toolkit`` when running scripts or running a single command.
* New: `sudo` functionality on Windows through an alias
* Automatically enhance colors for readability in the default terminal (cmd.exe)
on Windows. This functionality can be enabled/disabled with the
$INTENSIFY_COLORS_ON_WIN environment variable.
* Added ``Ellipsis`` lookup to ``__xonsh_env__`` to allow environment variable checks, e.g. ``'HOME' in ${...}``
* Added an option to update ``os.environ`` every time the xonsh environment changes.
This is disabled by default but can be enabled by setting ``$UPDATE_OS_ENVIRON`` to
True.
* Added Windows 'cmd.exe' as a foreign shell. This gives xonsh the ability to source
Windows Batch files (.bat and .cmd). Calling ``source-cmd script.bat`` or the
alias ``source-bat script.bat`` will call the bat file and changes to the
environment variables will be reflected in xonsh.
* Added an alias for the conda environment activate/deactivate batch scripts when
running the Anaconda python distribution on Windows.
* Added a menu entry to launch xonsh when installing xonsh from a conda package
* Added a new ``which`` alias that supports both regular ``which`` and also searches
through xonsh aliases. A pure python implementation of ``which`` is used. Thanks
to Trent Mick. https://github.com/trentm/which/
* Added support for prompt toolkit v1.0.0.
* Added ``$XONSH_CACHE_SCRIPTS`` and ``$XONSH_CACHE_EVERYTHING`` environment
variables to control caching of scripts and interactive commands. These can
also be controlled by command line options ``--no-script-cache`` and
``--cache-everything`` when starting xonsh.
* Added a workaround to allow ctrl-c to interrupt reverse incremental search in
the readline shell

**Changed:**

* Running scripts through xonsh (or running a single command with ``-c``) no
longer runs the user's rc file, unless the ``--login`` option is specified.
Also avoids loading aliases and environments from foreign shells, as well as
loading bash completions.
* rc files are now compiled and cached, to avoid re-parsing when they haven't
changed. Scripts are also compiled and cached, and there is the option to
cache interactive commands.
* Left and Right arrows in the ``prompt_toolkit`` shell now wrap in multiline
environments
* Regexpath matching with backticks, now returns an empty list in python mode.
* Pygments added as a dependency for the conda package
* Foreign shells now allow for setting exit-on-error commands before and after
all other commands via the ``seterrprevcmd`` and ``seterrpostcmd`` arguments.
Sensinble defaults are provided for existing shells.
* PLY is no longer a external dependency but is bundled in xonsh/ply. Xonsh can
therefore run without any external dependencies, although having prompt-toolkit
recommended.
* Provide better user feedback when running ``which`` in a platform that doesn't
provide it (e.g. Windows).
* The lexer now uses a custom tokenizer that handles regex globs in the proper
way.






**Fixed:**

* Fixed bug with loading prompt-toolkit shell < v0.57.
* Fixed bug with prompt-toolkit completion when the cursor is not at the end of
the line.
* Aliases will now evaluate environment variables and other expansions
at execution time rather than passing through a literal string.
* Fixed environment variables from os.environ not being loaded when a running
a script
* The readline shell will now load the inputrc files.
* Fixed bug that prevented `source-alias` from working.
* Now able to ``^C`` the xonfig wizard on start up.
* Fixed deadlock on Windows when running subprocess that generates enough output
to fill the OS pipe buffer.
* Sourcing foreign shells will now return a non-zero exit code if the
source operation failed for some reason.
* Fixed PermissionError when running commands in directories without read permissions
* Prevent Windows fixups from overriding environment vars in static config
* Fixed Optional Github project status to reflect added/removed files via git_dirty_working_directory()
* Fixed xonsh.exe launcher on Windows, when Python install directory has a space in it
* Fixed `$CDPATH` to support `~` and environments variables in its items

0.2.7

====================
**Added:**

* Added new valid ``$SHELL_TYPE`` called ``'best'``. This selects the best value
for the concrete shell type based on the availability on the user's machine.
* New environment variable ``$XONSH_COLOR_STYLE`` will set the color mapping
for all of xonsh.
* New ``XonshStyle`` pygments style will determine the appropriate color
mapping based on ``$XONSH_COLOR_STYLE``. The associated ``xonsh_style_proxy()``
is intended for wrapping ``XonshStyle`` when actually being used by
pygments.
* The functions ``print_color()`` and ``format_color()`` found in ``xonsh.tools``
dispatch to the approriate shell color handling and may be used from
anywhere.
* ``xonsh.tools.HAVE_PYGMENTS`` flag now denotes if pygments is installed and
available on the users system.
* The ``ansi_colors`` module is now available for handling ANSI color codes.
* ``?`` and ``??`` operator output now has colored titles, like in IPython.
* ``??`` will syntax highlight source code if pygments is available.
* Python mode output is now syntax highlighted if pygments is available.
* New ``$RIGHT_PROMPT`` environment variable for displaying right-aligned
text in prompt-toolkit shell.
* Added ``!(...)`` operator, which returns an object representing the result
of running a command. The truth value of this object is True if the
return code is equal to zero and False otherwise.
* Optional dependency on the win_unicode_console package to enable unicode
support in cmd.exe on Windows. This can be disabled/enabled with the
``$WIN_UNICODE_CONSOLE`` environment variable.

**Changed:**

* Updated ``$SHELL_TYPE`` default to ``'best'``.
* Shell classes are now responsible for implementing their own color
formatting and printing.
* Prompt coloring, history diffing, and tracing uses new color handling
capabilities.
* New ``Token.Color`` token for xonsh color names, e.g. we now use
``Token.Color.RED`` rather than ``Token.RED``.
* Untracked files in git are ignored when determining if a git workdir is
is dirty. This affects the coloring of the branch label.
* Regular expression globbing now uses ``re.fullmatch`` instead of
``re.match``, and the result of an empty regex glob does not cause the
argument to be deleted.


**Removed:**

* The ``xonsh.tools.TERM_COLORS`` mapping has been axed, along with all
references to it. This may cause a problem if you were using a raw color code
in your xonshrc file from ``$FORMATTER_DICT``. To fix, simply remove these
references.

**Fixed:**

* Multidimensional slicing, as in numpy, no longer throws SyntaxErrors.
* Some minor zsh fixes for more platforms and setups.
* The ``BaseShell.settitle`` method no longer has its commands captured by
``$(...)``

Page 19 of 20

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.