xonsh v0.2.7 Release Notes
-
โ 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 associatedxonsh_style_proxy()
is intended for wrappingXonshStyle
when actually being used by pygments. - The functions
print_color()
andformat_color()
found inxonsh.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 useToken.Color.RED
rather thanToken.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 ofre.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$(...)
- โ Added new valid