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 importing readline or prompt_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 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