xonsh v0.3.0 Release Notes
-
โ 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 importingreadline
orprompt_toolkit
when running scripts or running a single command. - ๐ New:
sudo
functionality on Windows through an alias - 0๏ธโฃ 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 aliassource-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 regularwhich
and also searches through xonsh aliases. A pure python implementation ofwhich
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
andseterrpostcmd
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