xonsh

Python-powered, cross-platform, Unix-gazing shell.

OTHER License

Downloads
69K
Stars
8K
Committers
330

Bot releases are visible (Hide)

xonsh - 0.10.1

Published by daniel-shimon about 3 years ago

Fixed pip install issue in 0.10.0!

Fixed:

  • execx and xonsh -c previously exposed xonsh-internal code in global scope. They also did not support defining variables and then referring to them in comprehensions, generators, functions, or lambdas. - https://github.com/xonsh/xonsh/issues/4363
  • Short color token names can be used in register_custom_style() (#4339)

Authors:

  • Gyuri Horak
  • Jeremy Schlatter
xonsh - 0.10.0

Published by daniel-shimon about 3 years ago

A HUGE release with tons of new stuff! 🥳 🎉

Notably the completion system was completely rewritten making it much more robust and flexible!
Also ctrl-Z should work by default and interactive commands won't be threaded.

Due to an issue with the new pip resolver, please install with --use-deprecated=legacy-resolver.

Note that the AppImage python version was upgraded to 3.9

Added:

  • Added ability to set XONSH_HISTORY_FILE before loading the history backend.

  • Added ability to get the arguments list in ExecAlias using $args and $arg<n> environment variables.

  • Added instruction how to run xonsh AppImage on Alpine

  • Xonsh now supports generators as completer functions.

  • Completion Context - Allow completers to access a parsed representation of the current commandline context.

  • Added casting CommandPipeline to int, hash and str.

  • Ability to call the tool by the name from callable alias with the same name without the infinite loop error.

  • on wsl field when running xonfig (when linux is detected)

  • Help and superhelp (obj? and obj??) now use the __name__ if available.

  • added $XONSH_GITSTATUS_FIELDS_TO_HIDE to hide unwanted fields from {gitstatus} prompt field.

  • Added number of lines added and removed to gitstatus

  • Saving current working directory (cwd) to the history.

  • Added XONSH_HISTORY_SAVE_CWD environment variable.

  • Added environment variable $COMPLETE_DOTS to specify how current and previous directories should be tab completed in cd ('./', '../'):

    • always Always complete paths with ./ and ../
    • never Never complete paths with ./ and ../
    • matching Complete if path starts with . or ..
  • Complete import keyword in from ... import statements.

  • Enabled case-insensitive completions for the jedi xontrib.

  • Non-exclusive completers that enable aggregating multiple completer results.

  • New $XONSH_CAPTURE_ALWAYS variable for opt-in interactive capturing.
    Since this capturing breaks background jobs and some interactive programs (like git invoking an editor),
    This behavior is now opt-in using this variable.
    See https://github.com/xonsh/xonsh/pull/4283 and linked issues.

  • Wrap selection with quote/parens when $XONSH_AUTOPAIR=True.

  • Now xonsh will work with Python 3.10. (Match statement is not supported).

  • In addition to reading single rc files at startup (/etc/xonshrc, ~/.config/xonsh/rc.xsh),
    xonsh now also supports rc.d-style config directories, from which all files are sourced. This is
    designed to support drop-in style configuration where you could, for example, have a common config
    file shared across multiple machines and a separate machine specific file.

    This is controlled by the environment variable XONSHRC_DIR, which defaults to
    ["/etc/xonsh/rc.d", "~/.config/xonsh/rc.d"]. If those directories exist, then any xsh files
    contained within are sorted and then sourced.

  • Added xontrib-prompt-starship - Starship prompt in xonsh shell.

  • Added XONSH_SUBPROC_CAPTURED_PRINT_STDERR (default False) environment variable to hide unwanted printing the stderr when using captured object.

  • A $XONSH_TRACE_COMPLETIONS variable for completions debugging.

  • Added warning about prompt-toolkit in the welcome message.

  • Added history backend name to the xonfig.

  • xontrib-linuxbrew <https://github.com/eugenesvk/xontrib-linuxbrew>_ to add Homebrew's shell environment to xonsh shell on Linux

  • Added xontrib-macro-lib - the library of the useful macros for the xonsh shell: https://github.com/anki-code/xontrib-macro-lib

Changed:

  • update imphooks encoding regex to match the newer version at PEP 263
  • Enabled bracketed paste mode for readline to protect against paste jacking
  • The group of environment variables around history moved to the "Interactive Prompt History" section.
  • Disabled completing subpaths for commands in jedi.
  • Improved which output for non-simple aliases
  • New json history will be in XONSH_DATA_DIR/history_json directory.
  • Completers for and/or, &&/||/| and environment variables are now non-exclusive.
  • Disabled ptk copying words/lines to clipboard on deletion (can be re-enabled with $XONSH_COPY_ON_DELETE).
  • Separated between XONSH_DEBUG and XONSH_NO_AMALGAMATE. Setting XONSH_DEBUG=1 now acts like XONSH_DEBUG=2 before (basic information like input transformation, command replacement) and XONSH_DEBUG=2 like XONSH_DEBUG=1 before (more debugging information presented, like PLY parsing messages).
  • Cleaned up available aliases for shell_type
  • Speedup commands-cache by saving results between runs and use the last run's result
  • The completer add command after the non-exclusive completers.
    This means it will not block them from adding their completions.
  • Updated the tab-completion tutorial.

Fixed:

  • handle importing/decoding user modules with a 'UTF-8 with BOM' encoding (#4160)
  • Fixed XONSH_HISTORY_FILE that has the actual path from the history backend now
  • Annotated assignments (x: int = 42, x: int).
  • Fixed xpip sudo behavior in xonsh AppImage.
  • Prevent cancelled future errors for async prompt ($ENABLE_ASYNC_PROMPT) fields from bubbling up (and destroying the prompt's formatting)
  • $() no longer silently captures stderr
  • Added catching callable argument and raising appropriate exception
  • Crashing command-not-found output for bad file names on linux.
  • Fixed error message when an empty command is run
  • Fixed @$ crash when no output is sent out by the command
  • Fixed xonsh crash when launched using xonsh -c '$("")'
  • now abbrevs callback will not remove word from buffer.text. See https://github.com/xonsh/xonsh/issues/3642#issuecomment-793789741
  • Fixed the incorrect SyntaxError that was thrown when a subprocess command was preceded by a comment ending with a colon
  • Fixed the missing auto-indentation in readline and prompt_toolkit when a statement ending with a colon was followed by a comment
  • Fixed the incorrect auto-indentation in prompt_toolkit when a comment ended with a colon
  • Fixed JSON history garbage collection for XONSH_HISTORY_SIZE in seconds.
  • Fixed skip completer (completes sudo, which and other commands).
  • In a subprocess command, having whitespace in between the left bracket and the command no longer raises a SyntaxError.
  • Reduced history reading when run script or command. Potential speed increasing.
  • Fixed crash on statup if XONSH_COLOR_STYLE is set to something invalid.
  • Fixed the colorize and/or keywords.
  • Functions can be used for $TITLE, the same way as for $PROMPT. (#4148)
  • wsl detection works on archlinux wsl2 now (and hopefully everywhere)
  • Fixed an exception when run xonfig wizard in no RC mode.
  • Bash completions now handle quoted and space-containing arguments better.
  • import completions always work.
  • Test consistent RC loading behaviour in a variety of startup scenarios
  • Absolute paths to executables don't break bash completions anymore
  • Fix colors and text in the welcome message.

Authors:

  • Gil Forsyth
  • anki-code
  • Noortheen Raja
  • Gyuri Horak
  • Daniel Shimon
  • Matthias Bussonnier
  • Gordon Ball
  • cryzed
  • Peter Ye
  • Evgeny
  • Jeremy Schlatter
  • jmoranos
  • Walter A. Boring IV
  • bhawkins
  • JackofSpades707
  • Luiz Antonio Lazoti
  • francium
xonsh - 0.9.27

Published by gforsyth over 3 years ago

Added:

  • Add new internal command "disown" to remove background jobs from the shell's job list
  • Python3.9 issues with subscriptor forms fixed.
  • added xontrib-cd
  • Added xontrib-history-encrypt - new history backend that encrypt the xonsh shell commands history to prevent leaking sensitive data. If you like the idea give a star to the repository https://github.com/anki-code/xontrib-history-encrypt

Changed:

  • New awesome landing on https://xon.sh - feel free to share and tweet!
  • History files (json, sqlite) now have 600 (rw only for user) permission by default.
  • PTK(python-prompt-toolkit) is no longer vendored with xonsh.

Fixed:

  • Fixed a bug where "cd" and "rmdir" would return non-directory completions
  • SQLite History Backend: show message instead of exiting when disk is full.

Authors:

  • Gil Forsyth
  • anki-code
  • Noortheen Raja
  • Tejasvi S Tomar
  • Evgeny
  • Adam Schwalm
  • Nate Simon
xonsh - 0.9.26

Published by gforsyth over 3 years ago

Added:

  • abbrevs now support callbacks
  • Added a new xontrib tcg

Fixed:

  • now xonsh stdout delegates isatty to wrapped io stream.

Authors:

  • Gil Forsyth
  • anki-code
  • Noortheen Raja
  • Gao, Xiang
xonsh - 0.9.25

Published by gforsyth over 3 years ago

Added:

  • VC_GIT_INCLUDE_UNTRACKED environment variable if untracked file changes are desired to show a dirty working directory

  • added xontrib-powerline2 <https://github.com/vaaaaanquish/xontrib-powerline2>_

  • Add '|' and '|=' operators to the Aliases class.

  • Add tests to the merging functionality.

  • Add "back2dir" xontrib (https://github.com/anki-code/xontrib-back2dir) - back to the latest used directory when starting xonsh shell.

  • show code-coverage for PRs

  • Added CommandPipeline.raw_out and CommandPipeline.raw_err to get stdout/err as raw bytes.

  • The @() operator now supports bytes objects.

  • index for history's sqlite-DB

  • support passing style from RichCompleter to PTK's Completer

  • xonsh.cli_utils to create cli from functions easily.

  • Python API for completer command with xonsh.completer module functions.

  • Added new environment variable $PROMPT_TOKENS_FORMATTER.
    That can be used to set a callable that receives all tokens in the prompt template.
    It gives option to format the prompt with different prefix based on other tokens values.
    Enables users to implement something like powerline
    without resorting to separate $PROMPT_FIELDS. Works with ASYNC_PROMPT as well.
    Check the PR <https://github.com/xonsh/xonsh/pull/3922>_ for a snippet implementing powerline

  • PTK style rules can be defined in custom styles using the Token.PTK token prefix.
    For example custom_style["Token.PTK.CompletionMenu.Completion.Current"] = "bg:#ff0000 #fff" sets the completion-menu.completion.current PTK style to white on red.

  • Added new environment variable XONSH_STYLE_OVERRIDES. It's a dictionary containing pygments/ptk style definitions that overrides the styles defined by XONSH_COLOR_STYLE.
    For example::

    $XONSH_STYLE_OVERRIDES["Token.Literal.String.Single"] = "#00ff00" # green 'strings' (pygments)
    $XONSH_STYLE_OVERRIDES["completion-menu"] = "bg:#ffff00 #000" # black on yellow completion (ptk)
    $XONSH_STYLE_OVERRIDES["Token.PTK.CompletionMenu.Completion.Current"] = "bg:#ff0000 #fff" # current completion is white on red (ptk via pygments)

  • support PTK's clipboard integration if pyperclip is installed.
    So that some common emacs like
    cut/copy <https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/examples/prompts/system-clipboard-integration.py>_
    will work out of the box.

  • Added Python 3.9 to continuous integration.

  • open in google cloud shell button 🤩

  • Respect ignorespace present in $HISTCONTROL

  • _get_normalized_pstring_quote returns a consistent set of prefixes, and the quote, for all path-string variants e.g. inputs pr' and rp' both produce the tuple ("pr", "'"). This function is used by xonsh.completers.complete_path and xonsh.completers._path_from_partial_string.

  • Added warning about huge amount of commands in CommandsCache that could affect on start speed.

  • New xonsh.procs subpackage for handling subprocess mode.

  • Environment variable $COMPLETION_MODE controls kind of TAB completion used with prompt-toolkit shell.
    default, the default, retains prior Xonsh behavior: first TAB displays the common prefix of matching completions,
    next TAB selects the first or next available completion.
    menu-complete enables TAB behavior like readline command menu-complete. First TAB selects the first matching
    completion, subsequent TABs cycle through available completions till the last one. Next TAB after that displays
    the common prefix, then the cycle repeats.

  • Added timing probes for prompt tokens, lexer and before prompt.

  • improve github actions by adding cache

  • xog xontrib - a simple command to establish and print temporary traceback
    log file.

  • Added xontribs section to the xonfig.

  • added xontrib-avox-poetry(http://github.com/jnoortheen/xontrib-avox-poetry)

  • added xontrib-broot(http://github.com/jnoortheen/xontrib-broot)

  • added xontrib-long-cmd-durations <https://github.com/jnoortheen/xontrib-cmd-durations>_

  • added xontrib-commands <https://github.com/jnoortheen/xontrib-commands>_

  • added xontrib-powerline3(http://github.com/jnoortheen/xontrib-powerline3)

  • Added xontrib-zoxide to the list of xontribs.

  • Added xontrib-gitinfo to the list of xontribs.

Changed:

  • CommandPipeline.__repr__ now returns formatted output wherein its printed
    attributes are also repr strings. This improves the output of !().
  • prompt-toolkit required version updated to >=3.0
  • group environment variables into categories.
  • The SQLite history backend now has the same logic of storing stdout to the memory like json history backend.
  • Using ujson (if installed) in LazyJSON to loading json history 15% faster.
  • use requirements.txt env in both CI/local/pre-commit checks
  • add caching to CI jobs to improve speed
  • The change that allows Nuitka build the xonsh binary.
  • Remove p, rp and pr prefix from partial p-string used in xonsh.completers._path_from_partial_string, such that ast.literal_eval does not raise SyntaxError. pr and rp strings are now treated internally as raw strings, but the p-string quote is correctly returned.
  • Increment the prefix length when the prefix input to xonsh.completers.complete_path is a p-string. This preserves the length of the prefix for path-string variants.
  • Pygments debug messages about cache will be shoen only in debug mode.
  • ulimit builtin now operates on "soft" limits by default.
  • tests for vc-branch should accept both master and main
  • upgrade black formatter to version 20.8b1
  • Use xontribs_meta.py instead of xontribs.json
  • Welcome message cosmetic changes.
  • rewrite xontribs/jedi.xsh -> xontribs/jedi.py to take advantage of python tooling

Deprecated:

  • PTK_STYLE_OVERRIDES has been deprecated, its function replaced by XONSH_STYLE_OVERRIDES
  • The xonsh.proc module has been deprecated. Please use the new
    xonsh.procs subpackage instead. Deprecation warnings related to this
    have been added.

Removed:

  • The deprecated foreground decorator has been removed.
    Please use unthreadable instead.
  • xonsh.proc.unthreadable and xonsh.proc.uncapturable
    have been moved to xonsh.tools. Please import from
    this module instead.

Fixed:

  • Now the directory and the symlink to this directory will be read from PATH once. Increasing the startup speed on Linux.

  • Environment variable registration no longer fails to validate when the default
    is a callable.

  • Default values created from callables are stored on in the evironment.

  • Completers also recognize : as a valid split point for insertion for, e.g. pytest completions

    .. code
    pytest test_worker::

  • Colorize and/or operators correctly like &&/||

  • Speed of CommandsCache increased when aliases have multiple updates (i.e. init conda).

  • Now when loading RC files, xonsh will not fail to import modules located on
    the same folder.

  • Setting an alias with IO redirections (e.g ls | wc) now works correctly.

  • PTK shell: window has no childres error while completion is triggered - https://github.com/xonsh/xonsh/issues/3963

  • make_xontrib - typerror - https://github.com/xonsh/xonsh/issues/3971

  • Fix libc detection on FreeBSD

  • Fix uptime functionality on FreeBSD

  • Updated History Backend tutorial.

  • enabled flake8 warning on ambiguous names. it is fun naming variables in coded words until oneday it looks like encrypted.

  • Added ANSI fallback for xonsh.tools.print_color if shell is not yet initialized. Fixes #3840.

  • ./run-tests.xsh without arguments previously gave an esoteric error. It
    now prints help on how to run the tests.

  • The git customisation example in the .xonshrc docs uses the right module name

Authors:

  • Anthony Scopatz
  • Jamie Bliss
  • a
  • David Strobach
  • Bob Hyman
  • anki-code
  • Gyuri Horak
  • Noortheen Raja
  • Carmen Bianca Bakker
  • Danny Sepler
  • vaaaaanquish
  • Daniel Shimon
  • Jerzy Drozdz
  • Faris A Chugthai
  • Asaf Fisher
  • Dominic Ward
  • omjadas
  • Leandro Emmanuel Reina Kiperman
  • Henré Botha
  • Aneesh Durg
  • colons
  • yggdr
xonsh - 0.9.24

Published by scopatz about 4 years ago

Added:

  • Ability to register custom styles via xonsh.pyghooks.register_custom_style
  • Add method of escaping an environment variable from expansion to the Bash to Xonsh Translation Guide.
  • added mypy to the project. many of the errors are ignored. but it is a start.
  • Added example of subproc calling to the tutorial.
  • New xontrib-sh (https://github.com/anki-code/xontrib-sh) to paste and run snippets from bash, zsh, fish.

Changed:

  • Now COMPLETIONS_CONFIRM is True by default.
  • xonsh.AppImage python version pinned to 3.8.
  • Cookiecutter template to creating new xontribs has many improvements (https://github.com/xonsh/xontrib-cookiecutter).
  • Docs sections improvement.

Removed:

  • Removed import random.

Fixed:

  • #1207 - custom color themes
  • Webconfig updarted for the NO_COLOR to RESET change.
  • async prompt field's returns from earlier data
  • Async prompt will now support nested-format strings in prompts
  • handle None value for ASYNC_PROMPT_THREAD_WORKERS
  • Fixed f-strings parsing in Python 3.9
  • Fixed reset color in xontrib list.
  • Fixed NO_COLOR to RESET in prompt_ret_code and mplhooks.

Authors:

  • Anthony Scopatz
  • David Strobach
  • a
  • anki-code
  • Gyuri Horak
  • Noortheen Raja
  • Will Shanks
xonsh - 0.9.23

Published by scopatz about 4 years ago

Added:

  • add API docs for ptk_shell.updator module
  • add flake8-docstrings to the project. it integrates pydocstyle to flake8.
  • Support for ANSI OSC escape sequences in $PROMPT, setting $TITLE for example. (#374, #1403)
  • Now ptk_shell supports loading its sections in thread, speeding up the prompt. Enable it by setting $ENABLE_ASYNC_PROMPT=True.
  • Added unset, export, set -e, set -x, shopt, complete to xontrib bashisms.
  • Use command_cache when finding available commands, to speedup command-not-found suggestions
  • Added Visual Studio Code (VSCode) extension and Vim syntax file to the Editors page.
  • Added exit(exit_code) function by default in not interactive mode. Now importing exit from sys is not needed.
  • Added Python syntax highlighting of xsh files on Github repo xonsh/xonsh
  • history clear, history off and history on actions, for managing whether history in the current session is saved.
  • ValueErrors from environ.register now report the name of the bad env var
  • Add a new color DEFAULT that is used to designate the terminal's default color.
  • Add a new special color token RESET used to reset all attributes.
  • Add a new xonsh tool 'print_warning' that prints a traceback with a warning message.
  • Added xontrib-onepath <https://github.com/anki-code/xontrib-onepath>_ to associate files with apps in xonsh shell like in graphical OS.
  • Added print_color and printx functions to builtins as reference to xonsh.tools.print_color.
  • Added to xontrib whole_word_jumping: Shift+Delete hotkey to delete whole word.
  • Added "Advanced String Literals" to the "Tutorial".
  • xonfig jupyter-kernel new subcommand to generate xonsh kernel spec for jupyter.
    Installing a new xonsh kernel for jupyter automatically removes any other one registered with jupyter,
    otherwise the new one might not be used.
  • Added xontrib powerline-binding (https://github.com/dyuri/xontrib-powerline-binding) - uses powerline to render the prompt.

Changed:

  • Improved printing of xonsh --shell-type argument in help message.
  • "Bash to Xonsh Translation Guide" improvements.
  • More stable exception handling in the tab completer.
  • Changed sections order in docs
  • The path type in ${...}.register was renamed to env_path as it should be and added
    new path type instead that represent pathlib.Path. Now you can register typed environment
    variables that will be converted to Path.
  • xonsh/environ.py: new rule: for "registered" environment variables (in DEFAULT_VARS or via env.register()),
    if default is set to DefaultNotGiven, then variable has no default and raises KeyError if it is not
    actually defined in environment. Likewise, "var" in __xonsh__.env will return False.
  • Changed defaults for ANSICON, TERM and VIRTUAL_ENV to DefaultNotGiven, so code can rationally test whether
    the expected external program has defined these variables. No need to do this for variables that xonsh
    itself defines.
  • Moved internal uses of NO_COLOR to RESET.
  • When retrieving the git status or other fields for building the prompt xonsh will run
    the git commands with $GIT_OPTIONAL_LOCKS=0. For details on what this entails see
    the git documentation for
    GIT_OPTIONAL_LOCKS <https://git-scm.com/docs/git#Documentation/git.txt-codeGITOPTIONALLOCKScode/>_.
  • Minor improvements to the get prompt speed. (Mostly in git.)
  • ptk key binding for TAB -- hitting TAB to start completion now automatically selects the first displayed completion (if any).
    hitting TAB when in insert mode inserts TAB, as heretofore. This more exactly follows behavior of readline menu-complete.
    There is no configuration option for tailoring this behavior.
  • xonfig info displays whether jupyter detected in environment and
    also path of xonsh jupyter kernel spec, if any.
  • xontrib-argcomplete and xontrib-pipeliner description improvement.

Deprecated:

  • Deprecated the NO_COLOR color reset token in favor of RESET.

Removed:

  • Deprecated --config-path argument suppressed from help.
  • setup no longer (tries to) install jupyter kernel automatically,
    user must run xonfig jupyter-kernel manually.

Fixed:

  • cygwin needs full path to find exe; disable thread_subprocs as default for cygwin
  • Fixed logic in git dirty working directory
  • Fixed type registration for *DIRS environment variables.
  • Fixed getting typed registered environment variable when it was initialized before registration.
  • Fixed #3703 and #3739, recent code change made it impossible to tell whether a (registered) environment variable
    was missing from environment or present and set to its registered default value. The test for ANSICON was
    failing due to this.
  • Fixed environment variables substitution: unknown variables stay unreplaced now (#3818).
  • Fixed xpg xontrib link
  • Fix crash when xonsh tries to run windows app execution aliases.
  • Setup wasn't consistently detecting jupyter in environment; python setup.py install worked, but
    pip install . wouldn't (because pip mucks with sys.path),
    nor would install from wheel (because it doesn't run setup.py).
  • xonfig info now displays actual value of ON_MSYS and ON_CYGWIN instead of lazy bool type.
    (maybe was happening only on Windows?)

Authors:

  • Anthony Scopatz
  • Gil Forsyth
  • Morten Enemark Lund
  • Bob Hyman
  • a
  • anki-code
  • christopher
  • Eadaen1
  • Danny Sepler
  • Gyuri Horak
  • cafehaine
  • Wendell Turner
  • Noortheen Raja
  • Marius van Niekerk
  • Wendell CTR Turner
xonsh - 0.9.22

Published by scopatz about 4 years ago

Added:

  • Added xontrib-argcomplete to support kislyuk/argcomplete - tab completion for argparse.
  • New tools.debian_command_not_found() function for finding commands in
    debian/ubuntu packages.
  • New tools.conda_suggest_command_not_found() function for finding commands in
    conda packages.
  • Borrow shift-selection from prompt-toolkit. Shift-arrow (selects a letter) and control-shift-arrow (selects a word) should now be supported.
  • Documentation for keyboard shortcuts
  • Xonsh now supports bash-style variable assignments preceding
    subprocess commands (e.g. $FOO="bar" bash -c r"echo $FOO").

Changed:

  • Added the fastest way to run xonsh AppImage to the docs.
  • command_not_found() is now a wrapper function that finds packages for missing
    commands in a variety of locations. This function now also takes an env argument
    for looking up values in the enviornment.
  • The variable cwd_dir, used for prompts,
    now always has a slash at the end, so users can use the
    construct "{cwd_dir}{cwd_base}" in their custom prompt definitions.

Fixed:

  • crash when starting wizard by xonfig wizard
    xonsh.environ: ensure get_docs(name).doc_default is str when name is not registered.
  • Fixed issue where xontribs were failing from AttributeError: '_MergedKeyBindings' object has no attribute 'add'

Authors:

  • Anthony Scopatz
  • David Strobach
  • Bob Hyman
  • anki-code
  • Danny Sepler
  • Eadaen1
xonsh - 0.9.21

Published by scopatz about 4 years ago

Added:

  • xonsh-in-docker.py script now has --pytest parameter,
    that automates pytest installation into the Docker container.
  • Setup extras tag '[full]' to install prompt-toolkit and pygments in one fell swoop.
    Full feature install can be pip install xonsh[full].
  • Support for PEP 570 positional-only parameters.
  • Support for starred expressions within return statement
    (return x, *my_list).
  • Xonsh now runs in Python 3.9
  • vox xontrib now supports new --activate and deactivate --remove
    to create + activate and deactivate + remove virtual environments in a single
    command.

Changed:

  • Rewrote Installation and Configuration sections of Getting Started doc
    to clarify install from packages, and generally improve flow.

Fixed:

  • Fixed incorrect reference to XONSH_HIST_SIZE instead of XONSH_HISTORY_SIZE
  • RST code-block:: xonshcon now works.
  • Non-default parameters can not follow defaults anymore.
  • Fixed parser not emmiting errors in some cases.

Authors:

  • Anthony Scopatz
  • Jamie Bliss
  • David Strobach
  • Bob Hyman
  • Will S
  • Danny Sepler
  • Marius van Niekerk
xonsh - 0.9.20

Published by scopatz about 4 years ago

Added:

  • abbrevs expansion now allows for setting cursor to a specific
    position within the expanded abbrev. For instance
    ::

    abbrevs["eswap"] = "with ${...}.swap():\n "

    expands eswap as you type to environment context manager
    swap() syntax and places the cursor at the position of the
    <edit> mark removing the mark itself in the process.

  • Support for ANSI escape codes in $PROMPT/$RIGHT_PROMPT. In this way 3rd party prompt generators like powerline or starship can be used to set the prompt. ANSI escape codes might be mixed with the normal formatting (like {BOLD_GREEN}) and prompt variables (like {user}) should work as well.
    For example:
    ::

    $PROMPT=lambda: $(starship prompt)
    $RIGHT_PROMPT="\x1b[33m{hostname} {GREEN}> "

  • Added $HOSTNAME and $HOSTTYPE environment variables.

  • New Env.rawkeys() iterator for iterating over all keys in an environment,
    not just the string keys like with __iter__().

  • New landing page for https://xon.sh

  • Added xonsh AppImage to the GitHub release assets

  • xonsh now comes with a bulitin version of prompt-toolkit (3.0.5) which will be used as fall back if prompt_toolkit is not installed.

  • Support for Python 3.8 PEP 572 assignment expressions (walrus operator).

Changed:

  • custom startup scripts replaced by setup.py -generated (console) entrypoint scripts for both xonsh and xonsh-cat.
    This means xonsh.bat and xonsh-cat.bat are replaced on Windows by xonsh.exe and xonsh-cat.exe, respectively.

Fixed:

  • Iterating over ${...} or __xonsh__.env yields only string
    values again.

  • List comprehensions do not ignore the second and subsequent if clauses
    in multi-if comprehension expressions any more.

  • Xonsh can now fully handle special Xonsh syntax within f-strings, including
    environmnent variables within ${} operator and captured subprocess
    expansion within f-string expressions.

  • Avoid startup error on Windows when py.exe chooses wrong python interpreter to run xonsh.
    When multiple interpreters are in PATH, 'py' will choose the first one (usually in the virtual environment),
    but 'py -3' finds the system-wide one, apparently by design.

  • For xonsh-cat, avoid parsing and processing first (0'th) argument when invoked directly from OS shell.

  • Run control files are now read in with $THREAD_SUBPROCS off.
    This prevents a weird error when starting xonsh from Bash (and
    possibly other shells) where the top-level xonsh process would
    be stopped and placed into the background during startup. It
    may be necessary to set $THREAD_SUBPROCS=False in downstream
    xonsh scripts and modules.

  • Fixed installation issues where generated files (like the parser table and
    amalgamated modules) were not installed.

  • The xonsh test suite has been cleaned up. So no more failing test. Hopefully.

  • Addressed robustness issue with "locked" history key not
    being present at startup.

  • vox xontrib works again with the new environment defaults.

Authors:

  • Anthony Scopatz
  • Morten Enemark Lund
  • David Strobach
  • Bob Hyman
  • anki-code
  • Raphael Das Gupta
  • Gyuri Horak
xonsh - 0.9.19

Published by scopatz about 4 years ago

Added:

  • history command now supports flush action

  • Added new items on "Bash to xsh" page

  • JsonHistory: added history gc --force switch to allow user to override above warning.

  • JsonHistoryGC: display following warning when garbage collection would delete "too" much data and don't delete anything.

    "Warning: History garbage collection would discard more history ({size_over} {units}) than it would keep ({limit_size}).\n"
    "Not removing any history for now. Either increase your limit ($XONSH_HIST_SIZE), or run history gc --force.",

    It is displayed when the amount of history on disk is more than double the limit configured (or defaulted) for $XONSH_HIST_SIZE.

  • $LS_COLORS code 'mh' now recognized for (multi) hard-linked files.

  • $LS_COLORS code 'ca' now recognized for files with security capabilities (linux only).

  • CI step to run flake8 after pytest.

  • RichCompletion for completions with different display value, description and prefix_len.

  • Allow completer access to multiline document when available via xonsh.completers.tools.get_ptk_completer().current_document.

  • abbrevs word expasion can now be reverted by pressing
    the space bar second time immediately after the previous
    word got expanded.

  • ulimit command.

  • pdb xontrib, that runs pdb debugger on reception of SIGUSR1 signal.

  • xontrib-xpg is a xontrib for running or explaining sql queries for posgresql database.

Changed:

  • Xonsh now launches subprocesses with their argv[0] argument containing
    the command exactly as inserted by the user instead of setting it to the
    resolved path of the executable. This is for consistency with bash and other
    shells.
  • Added ability to register, deregister environment variables;
    centralized environment default variables
  • Added exit to the "Bash to xsh" article.
  • xonsh.main _failback_to_other_shells now tries user's login shell (in $SHELL) before trying system wide shells from /etc/shells.
  • The current working directory is now correctly obtained in line 501 of xonsh/parsers/base.py
  • Garbage collection avoids deleting history and issues a warning instead if existing history is more than double the comfigured limit.
    This protects active users who might have accumulated a lot of history while a bug was preventing garbage collection. The warning
    will be displayed each time Xonsh is started until user takes action to reconcile the situation.
  • tests\test_integrations.py no longer runs with XONSH_DEBUG=1 (because new, debug-only progress messages from history were breaking it).
  • Updated pytest_plugin for pytest 5.4 API, pip requirements for pytest>= 5.4
  • Major improvements to Jedi xontrib completer:
    • Use new Jedi API
    • Replace the existing python completer
    • Create rich completions with extra info
    • Use entire multiline document if available
    • Complete xonsh special tokens
    • Be aware of _ (last result)
    • Only show dunder attrs when prefix ends with '_'
  • Many files are starting to be formatted using pyupgrade --py36-plus, in order to automatically update to newer
    Python constructs.
  • xontrib load does not stop loading modules on error any more.

Deprecated:

  • pytest --flake8 now exits with error message to use flake8 instead.
    Allows single list of lint exceptions to apply in CI and your IDE.

Removed:

  • Removed history replay
  • pytest-flake8 package from requirements*.txt
  • Xonsh now relies exclusively on Setuptools for install.
  • Compatibility with Python 3.5 has been removed as well as all related code. In
    particular xonsh.inspector does not defined getouterframes anymore, use
    inspect.getouterframe directly.

Fixed:

  • Unhandled exception triggered by unexpected return from callable alias.

  • Fix path completer throwing exception sometimes

  • Fixed help operator not displaying definition for callables.

  • JsonHistory.files(): Now once again enumerates history files from the directory. This has been broken for about 2 years.

  • JsonHistory.run_gc(): Don't busy loop while waiting for history garbage collection to complete, sleep a bit instead.
    This does much to keep Xonsh ptk_shell responsive when dealing with very large history on disk.

  • Fixed JSON history indexing error.

  • Fixed syntax error in scripts containing line continuation syntax.

  • $LS_COLORS code 'fi' now used for "regular files", as it should have been all along. (was 'rs')
    See (#3608)[https://github.com/xonsh/xonsh/issues/3608].

  • pyghooks.color_files now follows implememntation of ls --color closely. Thanks @qwenger!
    However, a few documented differences remain due to use in Xonsh.

  • $LS_COLORS['ln'] = 'target' now works. Also fixes #3578.

  • Fixed exit code for commands executed via -c (#3402)

  • Logical subprocess operators now work after long arguments (e.g. --version).

  • pip completer no longer erroneously fires for pipx

  • Updated development guide to reference flake8 instead of pylint

  • Corrected flake8 config for allowed exceptions.

  • various pytest warnings in a "clean" test run.

  • The current Mercurial topic is shown.

  • Fixed import problems due to modules using deprecated pkg_resources methods by proxying calls to the underlying loader.

  • Typo in 'source' alias.

  • Crash in 'completer' completer.

  • Don't complete unnecessarily in 'base' completer

  • Viewing mock objects in the shell

  • Fixed formatting error in vox rm command.

Authors:

  • Anthony Scopatz
  • Gil Forsyth
  • Morten Enemark Lund
  • Bob Hyman
  • David Strobach
  • Burak YiÄŸit Kaya
  • Matthias Bussonnier
  • anki-code
  • David Dotson
  • con-f-use
  • Daniel Shimon
  • Jason R. Coombs
  • Gyuri Horak
  • Achim Herwig
  • Marduk Bolaños
  • Stefane Fermigier
  • swedneck
  • Feng Tian
  • cafehaine
  • paugier
xonsh - 0.9.18

Published by gforsyth over 4 years ago

Added:

  • external xontrib-hist-navigator to facilitate directory history navigation.
  • Support package prompt-toolkit V3 as well as V2 in prompt_toolkit shell.
  • New xontrib-output-search <https://github.com/anki-code/xontrib-output-search>_ to get identifiers, names, paths, URLs and words from the previous command output and use them for the next command.
  • New xontrib-pipeliner <https://github.com/anki-code/xontrib-pipeliner>_ is to easily process the lines using pipes.
  • New xontrib-prompt-bar <https://github.com/anki-code/xontrib-prompt-bar>_ with elegance bar style for prompt.

Changed:

  • $SHELL_TYPE "prompt_toolkit" with any suffix creates the "prompt_toolkit" shell, requires package prompt-toolkit >= 2.0
  • Moved code from package xonsh.ptk2 to xonsh.ptk_shell (because it's the only one now); package xonsh.ptk2 redirects thence.
  • Added extremely simplified xonsh AppImage building process.
  • Added examples of usage $XONSH_TRACE_SUBPROC to the docs
  • Use UTF-8 encoding when writing .xonshrc with webconfig for Windows compatibility

Deprecated:

  • prompt-toolkit versions before 2.0

Removed:

  • package xonsh.ptk

Fixed:

  • Fixed name autosuggestion in path completer (#3519)
  • Flake8/black fixes to the whole code tree, in 3 steps.
    Devs should update their IDE to run both during file editing, to avoid a re-accumulation of arbitrary exceptions.
  • tests/test_builtins.py, fix test case test_convert_macro_arg_eval(kind).

Authors:

  • Gil Forsyth
  • Jamie Bliss
  • Bob Hyman
  • anki-code
  • Raphael Das Gupta
  • Noortheen Raja
  • Manor Askenazi
  • Marduk Bolaños
xonsh - 0.9.17

Published by scopatz over 4 years ago

Changed:

  • @$() subprocess operator now properly strips newline characters off
    the lines of multiline output.

  • @$() subprocess operator does not require leading and trailing whitespace
    anymore, so expansions like cd /lib/modules/@$(uname -r)/kernel or
    gdb --pid=@$(pidof crashme) are now possible.

  • Moved most CI to github actions (OSX is still on travis)

  • Replaced Repl.It with RunThis on the front page of the docs.

Fixed:

  • autovox xontrib now works with Python 3.5
  • It is now possible to pass "&" as the last argument in subprocess mode.
  • Fixed a bug on Windows causing FileNotFoundError exception if path
    elements contain trailing spaces.

Authors:

  • Anthony Scopatz
  • Gil Forsyth
  • David Strobach
xonsh - 0.9.16

Published by gforsyth over 4 years ago

Added:

  • Added abbrevs xontrib.
  • Added xontrib-pyenv <https://github.com/dyuri/xontrib-pyenv>_ to list of registered xontribs.

Changed:

  • xdg-open now runs unthreaded.

Fixed:

  • Return Token.Text when filesystem item's type not defined in LS_COLORS; avoid crashing Pygments.
  • Fixed bug on Windows if Path elements has trailing spaces. Windows in general and os.path.isdir()
    doesn't care about trailing spaces but os.scandir() does.

Authors:

  • Morten Enemark Lund
  • Bob Hyman
  • David Strobach
  • Gyuri Horak
  • Chris Lasher
xonsh - 0.9.15

Published by scopatz over 4 years ago

Added:

  • Adds documentation for how to setup an emacs editing mode for xonsh.
  • New $XONSH_TRACE_SUBPROC environment variable.
  • Added -l, -c and -a options to xexec, works now like exec
    in bash/zsh
  • $HISTCONTROL - errordups support for history-sqlite backend

Changed:

  • -l switch works like bash, loads environment in non-interactive shell
  • The xonsh pytest plugin no longer messes up the test order for pytest. Xsh test
    are still executed first to avoid a bug were other tests would prevent test_*.xsh
    files to run correctly.
  • New repo name for xxh

Fixed:

  • Correctly follow symlinks when using dot-dot paths with cd -P.
  • execx does not require the input string to be newline-terminated.
  • evalx accepts newline-terminated input string.
  • Fixed issue where negative exit codes (such as those produced
    by core dumps) where treated as logical successes when chaining
    processes with other boolean expressions.
  • Fixed XONSH_TRACE_SUBPROC for pipeline command.
  • updated CONTRIBUTING.rst about running pylint for changed files

Authors:

  • Anthony Scopatz
  • Morten Enemark Lund
  • David Strobach
  • anki-code
  • Samuel Lotz
  • Gyuri Horak
  • Noortheen Raja
  • Gabriel Vogel
  • anki
  • Jerzy Drozdz
xonsh - 0.9.14

Published by scopatz over 4 years ago

Added:

  • Added building process of standalone rootless AppImage for xonsh.
  • pyproject.toml -- so vscode can use black as python formatter interactively
  • The xonsh/interactive container has been added, in addition to the previous xonsh/xonsh and xonsh/action containers. See https://hub.docker.com/u/xonsh
  • New $THREAD_SUBPROCS environment variable allows you to
    specify whether threadable subprocesses should actually be
    run in a thread or not. Default True.
  • event on_lscolors_changed which fires when an item in $LS_COLORS changed.
  • dict pyghooks.file_color_tokens containing color tokens for file types defined in $LS_COLORS.
  • file pyproject.toml containing config rules for black formatter consistent with flake8
  • New umask utility to view or set the file creation mask
  • New xonfig web command that launches a web UI (in your browser) that
    allows users to configure their $XONSH_COLOR_STYLE, $PROMPT, and
    loaded xontribs in an interactive way. This is the prefered way to initialize
    the ~/.xonshrc file on a new system or for new users. It supersedes the
    old xonfig wizard command.
  • New xonsh.webconfig subpackage for creating and launching xonfig web.
  • Added localtime entry to the $PROMPT_FIELDS dictionary, allowing users
    to easily place the current time in their prompt. This can be formatted with
    the time_format entry of $PROMPT_FIELDS, which defaults to "%H:%M:%S".
    These are implemented in the new xonsh.prompt.times module.
  • The html module in xonsh.lazyimps was added to lazily import
    pygments.formatters.html.
  • New xonsh.pyghooks.XonshHtmlFormatter class that enables HTML formatting of
    xonsh color strings.

Changed:

  • the feature list: subprocess mode colorizes files per $LS_COLORS, when they appear as arguments in the command line.
    Yet another approximation of ls -c file coloring behavior.
  • file setup.cfg to declare flake8 rules for all tools (not just pytest)
  • Moved python 3.8 parsing out of base parser
  • The xonsh.pyghooks.XonshLexer now inherits from Python3Lexer,
    rather than PythonLexer.
  • xonsh.pyghooks.XonshStyle now presents the highlight_color and
    background_color from the underlying style correctly.

Removed:

  • Removed deprecated xonda xontrib from list

Fixed:

  • [color] in .gitconfig (#3427) <https://github.com/xonsh/xonsh/issues/3427>_ now stripped from {curr_branch}

  • Before <https://i.imgur.com/EMhPdgU.png>_

  • After <https://i.imgur.com/sJiqgsb.png>_

  • The autovox xontrib now preserves activated environment on cd
  • setup.cfg -- duplicated flake8 config so interactive use and test runs enforce same rules. (Implementation is arguably a regression.)
  • Pressing Ctrl+Z no longer deadlocks the terminal,
    allowing further input from the user, even for threaded
    subprocesses.
  • XonshImportHook.get_source() now takes a dotted module name instead of a file path, as it should
  • Fixed documentation on environment variable $PROMPT_REFRESH_INTERVAL.
  • Using rmtree on windows no longer attempts to use invalid rm command
    and uses del instead.
  • Avoid crash in SubprocessSpec._run_binary() when command line has 2 real subprocesses piped together.
  • Fixed an issue on Windows where pressing ctrl-c could sometimes result
    in a traceback if the process had already quit before being killed by xonsh.
  • Modified base_shell._TeeStdBuf to feed bytes not str to console window under VS Code.
  • Command line with leading whitespace improperly formated (PTK2/PTK3).
  • Fix Ctrl-C event causing Atribute error on Windows (for reals this time).
  • Unit test failures in test_integrations under ubuntu 19.10 with Python 3.8.0
  • .gitignore entries for venv under project root (as for autovox) and for VS Code.
  • Minor typo fixes to xontrib descriptions.

Authors:

  • Anthony Scopatz
  • Gil Forsyth
  • Morten Enemark Lund
  • Jamie Bliss
  • Bob Hyman
  • David Strobach
  • Burak YiÄŸit Kaya
  • anki-code
  • adam j hartz
  • Nickolay Bukreyev
  • Edmund Miller
  • Mike Crowe
  • Sylvain Corlay
  • Chris Lasher
  • Marcio Mazza
xonsh - 0.9.13

Published by scopatz about 5 years ago

Changed:

  • The $LS_COLORS environment variable will no longer raise exceptions when trying
    to convert ANSI color sequences to xonsh color names.

Removed:

  • Remove built in support for "win unicode console". Full unicode support on windows is now provided by
    using the new Windows terminal <https://github.com/microsoft/terminal>__.

Fixed:

  • Fixed issue converting ANSI color codes that contained both slow blink and set foreground
    or set background sequences.

  • Fix coreutils cat behaviour on empty input (e.g. cat -).

  • Fix Ctrl-C event causing Atribute error on Windows.

  • Fix Added OpenBSD as a platform

  • Fix Corrected aliases for OpenBSD to not include --color=auto and -v

  • Fixed a regession with xonsh superhelp ?? operator and which -v which showed Pythons builtin
    doc strings.

Authors:

  • Anthony Scopatz
  • Morten Enemark Lund
  • David Kalliecharan
xonsh - 0.9.12

Published by scopatz about 5 years ago

Added:

  • Added autovox xontrib
  • xonsh.lib.itertools.as_iterable for making sure that strings are turned into iterables
  • The percol command no longer predicts as threadable.

Changed:

  • The source alias is now unthreaded, enabling contextvars to be used
    correctly in sourced files.
  • Changed the ExecAlias to only be applied when the logical operators
    (and, or) are surrounded by whitespace.

Fixed:

  • Fixed missing ANSI color modifiers which causes traceback when they were used by $LS_COLORS.
  • gray empty bottom bar when using $XONSH_UPDATE_PROMPT_ON_KEYPRESS
  • xonsh.lib.subprocess.check_output() now properly captures output.
  • Correct ANSI colors for the default color scheme to stop suppressing the bold / italic / underline modifiers.
  • tab completion for cd correctly handles the CDPATH environment variable
  • On Windows, send CTRL_C_EVENT to subprocesses instead of SIGINT.
  • xonsh will return a non-zero exit code if it is run in file mode and
    cannot find the file specified, e.g.
$ xonsh thisfiledoesntexist.xsh
xonsh: thisfiledoesntexist.xsh: No such file or directory.
$ _.returncode
1
  • Fixed issue with Jedi xontrib incorrectly raising errors
    during tab completion.
  • Defining functions inside of the shell no longer crashes on Python 3.8.
  • The encoding for xonsh script are now always assumed to be utf-8, even on
    Windows where the default encoding can be different. This allows for writing
    real unicode characters in the xonsh script files.

Authors:

  • Anthony Scopatz
  • Gil Forsyth
  • Morten Enemark Lund
  • Jamie Bliss
  • christopher
  • Carmen Bianca Bakker
  • Caleb Hattingh
  • Sean Farley
  • Allan Crooks
  • micimize
  • nedsociety
  • fanosta
xonsh - 0.9.11

Published by scopatz about 5 years ago

Changed:

  • vox activate will now prepend the absolute path of the virtualenv bin/ directory (or Scripts/ on Windows) to $PATH; before this was a relative path.

Fixed:

  • "lou carcolh" example and description of endidx in completer tutorial
  • Logical operators in aliases are now executed as expected, e.g.
    aliases['echocat'] = 'echo "hi" and echo "there"' will, when run, return
hi
there

Authors:

  • Gil Forsyth
  • con-f-use
  • Caleb Hattingh
xonsh - 0.9.10

Published by scopatz about 5 years ago

Added:

  • $PROMPT_REFRESH_INTERVAL: Automatically invalidate the PROMPT every so many seconds.
  • Allow disabling individual items in gitstatus prompt

Fixed:

  • Fix cat can't read pseudo files with zero size such as /proc/* or /sys/* (#3182, #3199)
  • command-not-found: now works on non-Debian bansed distributions
  • Implemented 'target' psuedo-color in $LS_COLORS for link coloring based
    off of the link target. This was causing issues on some systems where this is
    the default.

Authors:

  • Anthony Scopatz
  • Gil Forsyth
  • Morten Enemark Lund
  • virus
  • vaaaaanquish
  • K.-Michael Aye
  • Alexander Steffen
  • Jan Chren
  • Sean Farley
  • László Vaskó
  • Nils ANDRÉ-CHANG
  • chengxuncc