xonsh v0.4.6 Release Notes

  • โž• Added:

    • ๐Ÿ†• New option COMPLETIONS_CONFIRM. When set, <Enter> is used to confirm completion instead of running command while completion menu is displayed.
    • ๐Ÿ‘ NetBSD is now supported.
    • Macro function calls are now available. These use a Rust-like f!(arg) syntax.
    • Macro subprocess call now available with the echo! x y z syntax.
    • A new event subsystem <http://xon.sh/tutorial_events.html>_ has been added.
    • howto install sections for Debian/Ubuntu and Fedora.
    • History methods __iter__ and __getitem__

    • tools.get_portions that yields parts of an iterable

    • โœ… Added a py.test plugin to collect test_*.xsh files and run test_*() functions.

    • __repr__ and __str__ magic method on LazyObject

    ๐Ÿ”„ Changed:

    • create_module implementation on XonshImportHook
    • Results of the bash tab completer are now properly escaped (quoted) when necessary.
    • โš  Foreign aliases that match xonsh builtin aliases are now ignored with a warning.
    • prompt_toolkit completions now only show the rightmost portion of a given completion in the dropdown
    • The value of 'none' is no longer allowed for $SHELL_TYPE just during the initial load from the environment. -D, later times, and other sources still work.
    • ๐Ÿ“œ yacc_debug=True now load the parser on the same thread that the Parser instance is created. setup.py now uses this synchronous form as it was causing the parser table to be missed by some package managers.
    • Tilde expansion for the home directory now has the same semantics as Bash. Previously it only matched leading tildes.
    • Context sensitive AST transformation now checks that all names in an expression are in scope. If they are, then Python mode is retained. However, if even one is missing, subprocess wrapping is attempted. Previously, only the left-most name was examined for being within scope.
    • ๐Ÿ dirstack.pushd and dirstack.popd now handle UNC paths (of form \\<server>\<share>\...), but only on Windows. They emulate behavior of CMD.EXE by creating a temporary mapped drive letter (starting from z: down) to replace the \\<server>\<share> portion of the path, on the pushd and unmapping the drive letter when all references to it are popped.

    • And dirstack suppresses this temporary drive mapping funky jive if registry entry HKCU\software\microsoft\command processor\DisableUNCCheck (or HKLM...) is a DWORD value 1. This allows Xonsh to show the actual UNC path in your prompt string and also allows subprocess commands invoking CMD.EXE to run in the expected working directory. See https://support.microsoft.com/en-us/kb/156276 to satisfy any lingering curiosity.

    • lazy_locate_binary handles binary on different drive letter than current working directory (on Windows).

    • _curr_session_parser now iterates over History

    • ๐Ÿ†• New implementation of bash completer with better performance and compatibility.

    • $COMPLETIONS_BRACKETS is now available to determine whether or not to include opening brackets in Python completions

    • xonsh.bat tries to use pylauncher <https://www.python.org/dev/peps/pep-0397/>_ when available.

    โœ‚ Removed:

    • History method show
    • _hist_get_portion in favor of tools.get_portions
    • Unused imports in proc, flake8.

    ๐Ÿ›  Fixed:

    • xonsh modules imported now have the file attribute
    • Context sensitive AST transformer was not adding argument names to the local scope. This would then enable extraneous subprocess mode wrapping for expressions whose leftmost name was function argument. This has been fixed by properly adding the argument names to the scope.
    • Foreign shell functions that are mapped to empty filenames no longer receive aliases since they can't be found to source later.
    • Correctly preserve arguments given to xon.sh, in case there are quoted ones.
    • Environment variables in subprocess mode were not being expanded unless they were in a sting. They are now expanded properly.
    • ๐Ÿ›  Fixed a bug that prevented xonsh from running scripts with code caching disabled.
    • Text of instructions to download missing program now does not get off and appears in whole.
    • Fix some test problems when win_unicode_console was installed on windows.
    • ๐Ÿ›  Fixed bug that prompt string and $PWD failed to track change in actual working directory if the invoked Python function happened to change it (e.g via os.chdir(). Fix is to update $PWD after each command in BaseShell.default().
    • The interactive prompt now correctly handles multiline strings.
    • cd \\<server>\<share> now works when $AUTO_PUSHD is set, either creating a temporary mapped drive or simply setting UNC working directory based on registry DisableUNCCheck. However, if $AUTO_PUSHD is not set and UNC checking is enabled (default for Windows), it issues an error message and fails. This improves on prior behavior, which would fail to change the current working directory, but would set $PWD and prompt string to the UNC path, creating false expectations.
    • ๐Ÿ›  fix parsing for tuple of tuples (like (),())
    • sys.stdin, sys.stdout, sys.stderr no longer complete with opening square brackets
    • xonsh now properly handles syntax error messages arising from using values in inappropriate contexts (e.g., del 7).