xonsh is a Python-powered, cross-platform, Unix-gazing shell language and command prompt.

Overview

xonsh

xonsh is a Python-powered, cross-platform, Unix-gazing shell language and command prompt.

The language is a superset of Python 3.6+ with additional shell primitives. xonsh (pronounced conch) is meant for the daily use of experts and novices alike.

What is xonsh?

If you like xonsh, the repo, write a tweet and stay tuned by watching releases.

Join the chat at https://gitter.im/xonsh/xonsh Matrix room: #xonsh:feneas.org Travis Appveyor Open in Google Cloud Shell

First steps

Visit https://xon.sh for more information:

Projects that use xonsh

  • gitsome: A supercharged Git/shell autocompleter with GitHub integration.
  • rever: Cross-platform software release tool.
  • Regro autotick bot: Regro Conda-Forge autoticker.
  • xxh: Using xonsh wherever you go through the ssh.
Comments
  • Slow startup

    Slow startup

    I tried xonsh on my 2011 Intel Atom netbook running Archlinux today and noticed the very slow startup times. It always takes between 12 and 15 seconds.

    Here is some profiling output (pruned for readability), it seems that xonsh spends at least 10 seconds in time.sleep:

    
             98465 function calls (95969 primitive calls) in 14.570 seconds
    
       Ordered by: cumulative time
    
       ncalls  tottime  percall  cumtime  percall filename:lineno(function)
         82/1    0.068    0.001   14.579   14.579 {built-in method builtins.exec}
            1    0.000    0.000   14.579   14.579 xonsh:2(<module>)
            1    0.002    0.002   13.697   13.697 __amalgam__.py:16514(main)
            1    0.000    0.000   11.733   11.733 __amalgam__.py:2048(run_code_with_cache)
            1    0.000    0.000   11.683   11.683 __amalgam__.py:1967(compile_code)
            1    0.002    0.002   11.683   11.683 __amalgam__.py:15984(compile)
            1    0.000    0.000   10.449   10.449 __amalgam__.py:15944(parse)
            2    0.013    0.006   10.433    5.217 base.py:287(parse)
            1    0.000    0.000   10.425   10.425 __amalgam__.py:16040(_parse_ctx_free)
          652   10.222    0.016   10.222    0.016 {built-in method time.sleep}
         83/7    0.008    0.000    2.401    0.343 <frozen importlib._bootstrap>:966(_find_and_load)
         83/7    0.004    0.000    2.398    0.343 <frozen importlib._bootstrap>:939(_find_and_load_unlocked)
            1    0.000    0.000    1.963    1.963 __amalgam__.py:16460(premain)
            1    0.000    0.000    1.848    1.848 __amalgam__.py:16230(__init__)
            1    0.000    0.000    1.832    1.832 __amalgam__.py:16292(_init_environ)
            1    0.000    0.000    1.831    1.831 __amalgam__.py:15915(__init__)
            1    0.001    0.001    1.767    1.767 __amalgam__.py:15769(load_builtins)
        103/7    0.002    0.000    1.446    0.207 <frozen importlib._bootstrap>:214(_call_with_frames_removed)
         76/6    0.007    0.000    1.445    0.241 <frozen importlib._bootstrap>:659(_load_unlocked)
         59/5    0.003    0.000    1.440    0.288 <frozen importlib._bootstrap_external>:659(exec_module)
           81    0.011    0.000    1.273    0.016 <frozen importlib._bootstrap>:879(_find_spec)
            1    0.000    0.000    1.232    1.232 inspect.py:1462(stack)
            1    0.001    0.001    1.232    1.232 inspect.py:1434(getouterframes)
           12    0.001    0.000    1.231    0.103 inspect.py:1394(getframeinfo)
           12    0.007    0.001    1.216    0.101 inspect.py:736(findsource)
        30/15    0.001    0.000    1.141    0.076 __amalgam__.py:67(__getattribute__)
    
    ...
    

    Edited to add: This is the output of xonfig:

    +------------------+----------+
    | xonsh            | 0.4.4    |
    | Git SHA          | None     |
    | Python           | 3.5.2    |
    | PLY              | 3.7      |
    | have readline    | True     |
    | prompt toolkit   | None     |
    | shell type       | readline |
    | pygments         | None     |
    | on posix         | True     |
    | on linux         | True     |
    | distro           | arch     |
    | on darwin        | False    |
    | on windows       | False    |
    | on cygwin        | False    |
    | is superuser     | False    |
    | default encoding | utf-8    |
    +------------------+----------+
    
    bug 
    opened by jeLee6gi 95
  • Run Subproc Refactor

    Run Subproc Refactor

    This is a major overhaul of the way subprocs are executed.

    The big idea here is that sub processes are now split into three pieces:

    • A process specification, which describes the process to be run and may be manipulated prior to execution
    • A process object, like Popen or ProcProxy, responsible for running a single command.
    • A command pipeline, which holds all specs and procs and in responsible for making sure that all procs in the pipeline read from and cleaned up correctly.

    To enable the streaming and iterating features that we desired, a new PopenThread class has been introduced. This adheres to the Popen API and should be the last non-callable proc in the pipeline. This is responsible for running a regular Popen proc on a separate thread, and reading its output in a non-blocking manner (which was tricky!).

    This PR also removes the TeePTY class and related psuedo-terminal handling. This PR should thus enable Storing stdout on all platforms now!

    Please bang on this as there are things I have probably missed.

    opened by scopatz 93
  • Does it work under Windows/Cygwin?

    Does it work under Windows/Cygwin?

    Windows 7 x64 Cygwin x86 Python3 3.4.3

    I installed xonsh with pip3 install xonsh and when I try to run it with xonsh I get the error:

    Exception in thread Thread-2:
    Traceback (most recent call last):
      File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
        self.run()
      File "/usr/lib/python3.4/site-packages/xonsh/readline_shell.py", line 281, in run
        RL_LIB.history_set_pos(i)
      File "/usr/lib/python3.4/ctypes/__init__.py", line 364, in __getattr__
        func = self.__getitem__(name)
      File "/usr/lib/python3.4/ctypes/__init__.py", line 369, in __getitem__
        func = self._FuncPtr((name_or_ordinal, self))
    AttributeError: function 'history_set_pos' not found (�[���%��P���)
    
    bug 
    opened by tkossak 78
  • iTerm2 shell integration with xonsh

    iTerm2 shell integration with xonsh

    In case you haven't seen it, iTerm2 has some nice shell integration that enables some nice features. These work by echoing some special escape sequences in the shell. I have written a Python library called iterm2-tools that has an API for these sequences, and implemented integration with IPython.

    I would like to implement integration with xonsh. This is effectively the only thing keeping me from using Xonsh in day-to-day work.

    The integration by printing special sequences before and after the prompt, and before and after the output of a command. The prompt integration is easy: you generally just need to wrap your $PROMPT with them. The tricky part is the sequence that has to be printed before the command output.

    Here are the integrations with other shells. Bash implements this using the DEBUG trap (bash also uses PROMPT_COMMAND instead of editing PS1 directly). zsh has preexec functions. tcsh has postcmd (I guess). And fish I'm not sure about (in each case, look how the ;C sequence is being echoed).

    I looked a little bit in xonsh and didn't see any obvious ways to do this without editing xonsh itself. I figured it would be easier to ask here than dig too hard, though.

    Secondly, would you like for some or any of this to be part of xonsh? I'd like to use iterm2-tools as a dependency. We could either make it so that xonsh does this automatically if iterm2-tools is installed (technically it could work in terminals other than iTerm2, such as the now defunct FinalTerm, where the integration codes originated). Otherwise, I could add it to iterm2-tools and people would need to add a couple of lines to their .xonshrc to enable it. I don't care very strongly either way about this. I mostly just want to get it working.

    For community

    ⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

    prompt-toolkit 
    opened by asmeurer 61
  • os.path.join returning TypeError in windows

    os.path.join returning TypeError in windows

    Shortly after updating to] 0.2.4 xonsh I noticed if If I try to run the following:

    import os
    os.path.join("one","two")
    

    I get the error: TypeError: 'Str' object is not iterable

    If I exit xonsh and run it from a normal python prompt is I get the expected output 'one\two'

    Was hoping some other windows user can confirm this issues I don't have another windows box to test this one. I uninstalled prompt-toolkit to see if it might be something with thatbut still get the same issue. So far can only confirm it is happening in windows. I'm running running python 3.4.3

    bug 
    opened by jsarver 60
  • Implementation of Event Subsystem

    Implementation of Event Subsystem

    Fixes #1489.

    This is my stab at an event bus, after talking to @scopatz.

    Please! Comments, questions, etc! I'm open to any ideas, or even scrapping this entire model of events.

    Basic usage, as it stands:

    @events.on_precommand
    def myhandler(cmd):
        print("About to run command:", cmd)
    

    This covers stand-alone functions, static methods, and maybe class methods? Instance methods certainly do not work.

    I believe the docstrings cover most of the usage, even if they currently ignore rst and numpy.

    opened by AstraLuma 53
  • [WIP] Pytest port

    [WIP] Pytest port

    This shouldn't go in yet and others are welcome to work on it if they want.
    Regarding several issues: #942 #940 #918

    and others, this is a first stab at changing the testing framework from nose to pytest.

    It's actually not too bad. The following tests work without any changes needed:

    test_aliases
    test_builtins
    test_dirstack
    test_foreign_shells
    test_inspectors
    test_lazy_json
    test_lexer
    test_ptk_history
    test_ptk_multiline
    test_replay
    test_wizard
    

    A few need only minimal changes (some already applied in #944)

    environ
     change ~from test.tools import~ to ~from tools import~
    execer
     change ~setup~ to ~setup_module~
    parser
     change ~setup~ to ~setup_module~
    history
     change ~from test.tools import~ to ~from tools import~
    replay
     works but weird error about command not found: the
    

    The only major problems are the following (which I have not addressed):

    1. test_imphooks -- fails, i think due to differences in mock/patch support
    2. test_main -- again, patch problem (I think)
    3. test_tools -- Ok, this works, but on my machine now runs 131680 tests, which is crazy.

    Anyway, I'm putting this here so others don't duplicate the effort (which again, wasn't that much). I'm surprised that there isn't TOO much to do. That said, if we want to support both nose and pytest, things might get hairy.

    opened by gforsyth 53
  • WIP Full Pytest Migration

    WIP Full Pytest Migration

    moving to pytest idioms (some of these should be added to testing section on CONTRIBUTING)

    the conftest.py has a yield_fixture called xonsh_builtins that is a replacement for the old mock_xonsh_env context manager. xonsh_builtins sets and yields builtins To use xonsh_builtins in a test we just specify it as an argument to the test, i.e:

    def test_one(xonsh_builtins):
         ...
    

    the xonsh builtins get set when the test starts and teared when the test ends.

    note that there is no need to import that fixture from anywhere, fixtures that exist in conftest.py pytest will pick up and use in all tests.

    xonsh_builtins sets __xonsh_env__ to be an empty dict. if we want to set the __xonsh_env__ to a different initial value we set it directly from xonsh_builtins.__xonsh_env__

    def test_one(xonsh_builtins):
        xonsh_env.__xonsh_env__ = ENV_1
        ...
    

    if we want to test for different __xonsh_env__ values we can use parametrization i.e:

    @pytest.mark.parametrize('env', [ENV_1, ENV_2])
    def test_one(xonsh_builtins, env):
        xonsh_builtins.__xonsh_env__ = env
        ...
    

    this will run 2 times each time with the respective env setup.

    if we want to set the same __xonsh_env__ for different tests we can create a new fixture (ty @melund ! ) i.e:

    @pytest.fixture
    def special_env(xonsh_builtins):
         xonsh_builtins.__xonsh_env__['Strombus'] = "gigas"
    
    def test_1(special_env):
         assert True
    
    def test_2(special_env):
         assert True
    

    i have added a TODO.txt to track progress.

    tests 
    opened by ghost 45
  • Jupyter

    Jupyter

    Added hooks for Jupyter notebooks to be automatically installed. Now the only thing is that this won't come with the pip or conda packages unless we make the packages dependent on jupyter / ipython. Does this sound reasonable to people?

    opened by scopatz 45
  • Rich History

    Rich History

    This PR adds a rich history object and picks up where @aig787 left off.

    History is now a set of LazyJSON files that store the following data:

    {'env': {},  // Environment that xonsh was started with
     'sessionid': str, // UUID4 for the session
     'ts': [start, stop],  // start and stop timestamps for session [s since epoch]
     'locked': True, // boolean for whether the file is in use or not
     'cmds': [  // array of commands
        {'inp': str, // input command
         'ts': [start, stop], // timestamps for the command
         'rtn': int, // command return code
         'out' str, // stdout and stderr of command, for subproc commands this is only available on Linux.
         }, 
        ...
      ],
    }
    

    This PR does not address the things that one might want to do with such history. It was getting a bit heavyweight, and I figured that those could come in smaller, dedicated PRs.

    Also, capturing subproc output while remaining responsive in the same terminal was so much more difficult than I had anticipated. This is why it is only implemented for Linux right now. Implementation and testing on other platforms should come in time :).

    opened by scopatz 44
  • Virtualenv in xonsh shell

    Virtualenv in xonsh shell

    I have some weird behaviour sometimes, when running a command within a virtualenv in a xonsh shell, e.g.

     $ ~/venvs/v3env/bin/py.test --nomigrations .
    Traceback (most recent call last):
      File "/Users/ruben/venvs/v3env/bin/py.test", line 7, in <module>
        from pytest import main
    ImportError: No module named 'pytest'
    

    Same command in bash

     $ ~/venvs/v3env/bin/py.test --nomigrations .
    ======================================= test session starts ========================================
    platform darwin -- Python 3.4.3 -- py-1.4.30 -- pytest-2.7.2
    rootdir: <redacted>, inifile: pytest.ini
    plugins: cover, django, mock, splinter, xdist
    collected 334 items
    [...]
    

    I can't imagine why this should be a problem. Seems like Xonsh tries to run it within its own Python environment instead of in bash process mode. Or, maybe the shebang line is not handled properly? The py.test script looks like this:

    #!/Users/ruben/venvs/v3env/bin/python3.4
    
    # -*- coding: utf-8 -*-
    import re
    import sys
    
    from pytest import main
    
    if __name__ == '__main__':
        sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
        sys.exit(main())
    
    bug 
    opened by eldamir 42
Releases(0.13.4)
  • 0.13.4(Dec 8, 2022)

    Added:

    • tests for methods changed in tools.py (is_tok_color_dict)
    • $XDG_CACHE_HOME, $XONSH_CACHE_DIR are now available inside Xonsh
    • #2455 Add on_command_not_found event, fired when a command is not found.

    Changed:

    • is_str_str_dict changed to check for Token:style dict

    Removed:

    • $COMMANDS_CACHE_SIZE_WARNING is removed. When $COMMANDS_CACHE_SAVE_INTERMEDIATE is enabled, the cache file size is optimized.

    Fixed:

    • #4668 Fix ptk completion stacking when auto-suggest is on and no normal completions are generated.
    • $XONSH_STYLE_OVERRIDES cannot be assigned dict of {Token: str} #4375
    • commands_cache: add a configurable value to disable cache. useful for running scripts
    • fixed stale results when $COMMANDS_CACHE_SAVE_INTERMEDIATE is enabled.
    • #4951 Fix gitstatus prompt when rebasing
    • fixed using aliases to override commands without the file extension on Windows
    • #3279 Add XONSH_HISTORY_IGNORE_REGEX support. You can specify a regular expression in the environment variable XONSH_HISTORY_IGNORE_REGEX and any command that matches the expression will not be added to the history.

    Authors:

    • Noortheen Raja
    • pre-commit-ci[bot]
    • Vasilis Gerakaris
    • Lie Ryan
    • Blake Ramsdell
    • Justin
    • yotamolenik
    • austin-yang
    • Marco Rubin
    • Qyriad
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.13.4.tar.gz(12.07 MB)
    xonsh-x86_64.AppImage(26.49 MB)
  • 0.13.3(Sep 15, 2022)

  • 0.13.2(Sep 15, 2022)

    Changed:

    • When there is no git repository, the values of all gitstatus prompt fields are now None.
    • With $THREAD_SUBPROCS=False: When a callable alias is executed with ![], its standard output and standard error are no longer captured. This is because a separate thread is required in order to both capture the output and stream it to the terminal while the alias is running.

    Fixed:

    • Fixed timeit syntax error
    • When there is no git repository, $PROMPT format strings like {gitstatus: hello {}} now work as expected.
    • With $THREAD_SUBPROCS=False: When cd is used with an invalid directory, the error message is now correctly displayed.
    • Fixed case when xpip returns None instead of command.

    Authors:

    • anki-code
    • Peter Ye
    • pre-commit-ci[bot]
    • Lie Ryan
    • amukher3
    • Ashish Kurmi
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.13.2.tar.gz(12.07 MB)
  • 0.13.1(Aug 10, 2022)

    Added:

    • The ujson (faster version of json) added to xonsh[full] package.

    Changed:

    • Bumped Python version in xonsh.AppImage to 3.10
    • The terminal's title is updated with the current command's name even if the command is a captured command or a callable alias

    Fixed:

    • Warn and continue if a user without pygments tries to load an unknown style
    • Fixed a bash completion bug when prefixing a file path with '<' or '>' (for redirecting stdin/stdout/stderr)
    • Fixed a bash completion bug when completing a git branch name when deleting a remote branch (e.g. git push origin :dev-branch)
    • A callable alias containing subprocess commands no longer freezes when piped to another command
    • less no longer stops when a callable alias containing subprocess commands is piped into it
    • gitstatus Prompt-field would be empty on paths without git setup.
    • When using the sway window manager, swaymsg -t get_inputs no longer fails with the error "Unable to receive IPC response"
    • The current_job variable now works as expected when used in $TITLE

    Security:

    • xpip will never add sudo under any circumstances and will instead append --user as needed

    Authors:

    • Gil Forsyth
    • Noortheen Raja
    • anki-code
    • Peter Ye
    • pre-commit-ci[bot]
    • Stefano Rivera
    • jbw3
    • jgart
    • Michael Panitz (at Cascadia College)
    • Tim Gates
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.13.1.tar.gz(12.07 MB)
  • 0.13.0(Jul 8, 2022)

    Removed:

    • The xonsh code-base is no longer amalgamated, so tracebacks should be human-readable without intervention. This may have (minor) impacts on startup speed.

    Fixed:

    • Fix xontrib loading for free_cwd
    • Fixed whole_word_jumping xontrib failing on Linux, conditional import of ptk_win32 → Windows only
    • Fixed error caused by unintialized Xonsh session env when using Xonsh as a library just for its Pygments lexer plugin.

    Authors:

    • Gil Forsyth
    • Noortheen Raja
    • anki-code
    • Eddie Peters
    • cmidkiff87
    • Hannes Römer
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.13.0.tar.gz(12.07 MB)
  • 0.12.6(Jun 21, 2022)

  • 0.12.5(Jun 17, 2022)

    Added:

    • Autoloadable xontribs
    • Support for f-glob strings (e.g. ``fg`{prefix}*```)
    • Now xontribs support loading and unloading <https://github.com/xonsh/xonsh/issues/4541>_ with functions _load_xontrib_(xsh: XonshSession, **kwargs) -> dict, _unload_xontrib_(xsh: XonshSession, **kwargs) -> None defined in their module. Updated doc <https://xon.sh/tutorial_xontrib.html>_
    • Added a special '$LAST_RETURN_CODE' environment variable to access the return code of the last issued command. (Only set during interactive use).
    • New prompt-customization fields: 'last_return_code_if_nonzero', 'last_return_code'.
    • Documented the HISTCONTROL ignorespace option

    Changed:

    • ![] now returns a HiddenCommandPipeline when run with a background command (e.g. ![sleep 10 &])
    • Extended whole_word_jumping xontrib with matching bindings for delete and backspace. The XONSH_WHOLE_WORD_CTRL_BKSP environment variable can be set to False to avoid binding control+backspace in incompatible terminals.
    • The default prompt (on unix-systems) now includes a red [] field in case a command failed.
    • New docs theme furo
    • completions from fish are now filter based on the current prefix.

    Removed:

    • xontrib prompt_ret_code is now removed. Now the default prompt already shows the last-return-code when the previous command fails. Please use the new prompt fields last_return_code, last_return_code_if_nonzero from the PR <https://github.com/xonsh/xonsh/pull/4798>_

    Fixed:

    • Using fg for commands started in the background (e.g. ![sleep 10 &]) now works
    • SIGHUP (instead of SIGKILL) is sent to unfinished jobs when exiting the shell. This allows the nohup command to work properly.
    • bg now properly resumes jobs in the background
    • ExecAlias now sets the returncode of a command correctly
    • Empty/comment-only commands no longer get added to the history
    • On prompt-toolkit, when there is a job like sleep 500 & running in the background, pressing Ctrl+D twice to force quit now works properly
    • Environment Variables are now completed correctly when in quotes
    • Silence spurious errors on exit due to out-of-order cleanup

    Authors:

    • Gil Forsyth
    • Noortheen Raja
    • Peter Ye
    • dev2718
    • dependabot[bot]
    • Stefano Rivera
    • Naveen
    • jbw3
    • Italo Cunha
    • Timmy Welch
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.12.5.tar.gz(12.07 MB)
  • 0.12.3(May 8, 2022)

    Changed:

    • fix: remove os.path.basename from _get_git_branch()
    • now 3rd party xontrib list is maintained at Awesome Xontribs <https://github.com/xonsh/awesome-xontribs/>_ page. Going forward, new contributions will be updated here, making it not depending on the xonsh release <https://github.com/xonsh/xonsh/issues/4679>_.

    Removed:

    • Removed Python 3.7 support following NEP0029 <https://numpy.org/neps/nep-0029-deprecation_policy.html>_

    Fixed:

    • Dictionaries are now pretty-printed with their items in the correct order

    Authors:

    • Gil Forsyth
    • Noortheen Raja
    • Peter Ye
    • doronz88
    • Stefano Rivera
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.12.3.tar.gz(12.07 MB)
    xonsh-x86_64.AppImage(25.72 MB)
  • 0.12.2(Apr 25, 2022)

    Fixed:

    • Fixed completions for command argument paths after equal signs
    • A trailing space no longer gets appended when tab-completing command arguments that involve equals signs. For example dd sta gets completed to dd status=, without a space space after the equals sign.
    • regression on gitstatus <https://github.com/xonsh/xonsh/pull/4771>_ prompt is fixed now. It will display the value now instead of the name.
    • fixed <https://github.com/xonsh/xonsh/pull/4763>_ vox rm crashing when user input is required

    Authors:

    • Gil Forsyth
    • Noortheen Raja
    • Peter Ye
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.12.2.tar.gz(12.07 MB)
    xonsh-x86_64.AppImage(25.72 MB)
  • 0.12.1(Apr 15, 2022)

  • 0.12.0(Apr 14, 2022)

    Added:

    • Added interface to complete any alias that has xonsh_complete attribute. It is a function with fn(**kwargs) -> Iterator[RichCompletion | str] signature.

    • added $ALIAS_COMPLETIONS_OPTIONS_LONGEST to control showing options in completions

    • added $CMD_COMPLETIONS_SHOW_DESC environment variable to control showing command completions with a description part.

    • completer complete command is added to test current completions

    • completions from man page will now show the description for the options if available.

    • $XONSH_COMPLETER_DIRS to put command completers

    • Aliases.register to register an alias function.

    • Tracebacks are now printed in color if available (interactive session with shell that supports colors with pygments installed and $COLOR_RESULTS enabled)

    • Added python's match statement for python >=3.10.

    • Added support for the $SHLVL environment variable, typed as int, using bash's semantics.

    • Python files with command completions can be put inside xompletions namespace package, they will get loaded lazily.

    • xontrib.fish_completer is available to complete using fish shell.

    • Support for pythons sys.last_type, sys.last_value, sys.last_traceback.

    • added xonsh-uname command to xoreutils

    • auto-completion support for commands : source-foreign, source-bash, source-zsh, source-cmd

    • added history transfer command to transfer history entries between backends.

    • now $PROMPT_FIELDS is a custom class with method pick(field_name) to get the field value efficiently. The results are cached within the same prompt call.

    • new class xonsh.prompt.base.PromptField to ease creating/extending prompt-fields

    • Sublime Text 4 extension to the Editors page.

    • Support for the virtualenv <https://virtualenv.pypa.io/en/20.0.1/extend.html#activation-scripts>_ activate.xsh script is back! Ensure you create the virtualenv from the same python where xonsh is installed.

    • vox new/create accepts a new --prompt argument, which is passed through to python -m venv

    • New set of commands and options to manage virtualenvs inspired from pew

      • runin

      • runinall

      • new

        • --link : to associate venv with project directory
        • --temp : to create temporary virtualenvs
      • activate

        • now will cd into project directory if the venv is associated
      • toggle-ssp - toggle system site packages

      • project - manage project path associations

      • wipe - to quickly remove all user installed packages

    • prompt.env.env_name is now aware of the "prompt" key in pyvenv.cfg - search order from first to last is: $VIRTUAL_ENV_PROMPT, pyvenv.cfg, $VIRTUAL_ENV, $CONDA_DEFAULT_ENV

    • new command vox upgrade

    • xonfig web can now update abbrevs/aliases/env-variables.

    • Added xontrib-default-command <https://github.com/oh-my-xonsh/xontrib-default-command> to xontrib list.

    • new xontrib-django <https://github.com/jnoortheen/xontrib-django>_ for django management completions

    • Added xontrib-gruvbox <https://github.com/rpdelaney/xontrib-gruvbox> to xontrib list.

    • Added xontrib-up <https://github.com/oh-my-xonsh/xontrib-up> to xontrib list.

    Changed:

    • Both *.xsh and *.py files inside $XONSHRC_DIR will get loaded now.

    • Environment-variables of no predefined type or path environment variables are now represented as strings via the empty string.

    • Made stacktraces behave like in python, i.e. when something in user-provided code fails (both interactively and non-interactively), only that part is shown, and the (static) part of the stacktrace showing the location where the user code was called in xonsh remains hidden. When an unexpected exception occurs inside xonsh, everything is shown like before.

    • run_compiled_code, run_script_with_cache, run_code_with_cache now return sys.exc_info() triples instead of throwing errors

    • SyntaxError tracebacks now by default hide the internal parser state (like in python); set XONSH_DEBUG >= 1 to enable it again.

    • XonshError tracebacks now by default hide xonshs internal state; set XONSH_DEBUG >= 1 to enable it again.

    • run_code_with_cache takes a new parameter display_filename to override the filename shown in exceptions (this is independent of caching)

    • Update uptime lib by the last one from Pypi

    • umask, ulimit commands will not override the system's commands unless requested

    • Xontribs that require other third party packages are moved to its own packages. The following xontribs are moved and can be loaded after install as usual

      • mpl
      • distributed
      • jupyter-kernel
      • jedi
    • Xonsh adopts NEP-0029 <https://numpy.org/neps/nep-0029-deprecation_policy.html>_ in supporting Python versions.

    • Privatise certain attributes of lexer/parser to minimise API surface

    • Make XSH.load calls explicit (not in Execer)

    • Make import hooks require Execer

    • Simplified foreign functions

    • Updated tutorial.rst to clarify use of time_format

    • vox new will use default python version of the system rather than the one vox is run with

    • xonfig web now shows latest xontribs available from xonsh.xontribs_meta

    Removed:

    • $XONSH_GITSTATUS_* is removed since the prompt fields can be customized easily now individually.
    • $XONSH_GITSTATUS_FIELDS_HIDDEN is removed. Please set hidden fields in $PROMPT_FIELDS['gitstatus'].hidden = (...)
    • Removed xonsh.ptk2 module whcih was kept for some old packages sake. Now xonsh requires atleast ptk3 version.

    Fixed:

    • Some of the bash completions scripts can change path starting with '~/' to /home/user/ during autocompletion. xonsh bash_completions does not expect that, so it breaks autocompletion by producing paths like ~/f/home/user/foo. After the fix if bash returns changed paths then /home/user prefix will be replaced with ~/.
    • pip completer now handles path completions correctly
    • SyntaxErrors thrown during compilation (i.e. not during parsing) now include the offending source line.
    • If a .xsh file is imported, the resulting module will now always have an absolute __file__ attribute to be consistent with pythons behavior since python 3.4.
    • $CONDA_DEFAULT_ENV is now respected when xonsh is run outside of conda.
    • Fixed unpacking of dictionaries inside a dictionary
    • Empty or comments only .xsh files can now be imported to align with pythons behavior.
    • Fixed regex globbing for file paths that contain special regex characters (e.g. "test*1/model")
    • Fixed list comprehension in return statement incorrectly being parsed as a subprocess command.
    • Fixed the expansion of $XONSH_TRACEBACK_LOGFILE user paths (e.g. "~/log")
    • Fixed DeprecationWarning when providing autocompletion for a non-callable type with (
    • OSC codes in $PROMPT is no longer removed when using ptk shell. These codes need to be escaped with \001..\002 instead.
    • Attempt to show a modal cursor in vi_mode (ie. block in cmd, bar in ins)
    • Xonsh can now be used in VIM (e.g. by ":read !ls" if VIM is configured to use xonsh. This may be the case when xonsh is the default shell.)
    • Fixed OSError on Windows when GnuWin32 is installed in the PATH.
    • Do not show welcome message when any $XONSHRC_DIR directory entry exists.
    • SyntaxErrors now get initialized with all available fields so that the error message can be formatted properly.
    • Raising BaseException no longer causes Xonsh to crash (fix #4567)
    • Exceptions in user code when using xonsh non-interactively no longer simply crash xonsh, rather a proper stacktrace is printed and also postmain() is called.
    • Tracebacks will now show the correct filename (i.e. as in python) for interactive use "", scripts read by stdin "" and -c commands "". (Instead of MD5 hashes as filenames or "")
    • Default ZSH FUNCSCMD was not working in ZSH 5.8 (and possibly other versions)
    • Passing multiple files to be sourced to source-foreign was broken
    • prompt field current_branch will now work empty git repository.

    Authors:

    • Gil Forsyth
    • Noortheen Raja
    • anki-code
    • Daniel Shimon
    • Peter Ye
    • Jason R. Coombs
    • dev2718
    • Evgeny
    • Angus Hollands
    • omjadas
    • Oliver Bestwalter
    • Samuel Dion-Girardeau
    • Ryan Delaney
    • E Pluribus Unum
    • ylmrx
    • Hierosme
    • Kyllingene
    • zzj
    • Daniel
    • Ganer
    • mattmc3
    • Evan Hubinger
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.12.0.tar.gz(12.07 MB)
    xonsh-x86_64.AppImage(26.61 MB)
  • 0.11.0(Nov 17, 2021)

    v0.11.0

    Added:

    • added new utility classes xonsh.cli_utils.ArgParserAlias, xonsh.cli_utils.ArgCompleter. These are helper classes, that add coloring and auto-completion support to the alias-commands.
    • when $ENABLE_ASYNC_PROMPT=True lazy load prompt-toolkit's color-input support.
    • Add CTRL-Right key binding to complete a single auto-suggestion word.
    • Show environment variables' type and descriptions when completing them.
    • Add CTRL-Backspace key binding to delete a single word via $XONSH_CTRL_BKSPC_DELETION.
    • Improved pip/xpip completer.
    • Separator used by gitstatus can now be styled using XONSH_GITSTATUS_SEPARATOR.
    • Complete 'import' statements with modules that aren't loaded.
    • Complete multiple modules/objects in 'import' statements.
    • Multiple new metadata fields in setup.py
    • Pure Python control files are now supported when named *.py. Using python files may lower the startup time by a bit.
    • new environment variable $XONSH_TRACE_SUBPROC_FUNC to handle $XONSH_TRACE_SUBPROC output
    • Added xontrib-pyrtn <https://github.com/dyuri/xontrib-pyrtn> to xontrib list.

    Changed:

    • Display error message when running xonfig colors in a non-interactive shell
    • Using ArgparserAlias for dirs, popd, pushd
    • use ArgparserAlias for disown alias with completion support
    • history alias now has colored help message and completion support when running interactively.
    • using ArgparserAlias for trace alias with completion support
    • improve vox CLI completions
    • use ArgparserAlias for xexec. Now it supports completions.
    • xonfig now has colored help message when ran interactively.
    • Using ArgparserAlias to improve xontrib completions
    • Changed !() to also capture background subprocesses
    • Suggested commands are cached for better performance.
    • Improved pipelines performance by using a mutable buffer.
    • Curly braces { } in directory names are now escaped in the prompt
    • The --rc argument is extended to support directories as well as files. Passing a directory will result in all *.xsh files in the directory being sorted and loaded at startup (equivalent to using the environment variable XONSHRC_DIR).
    • The environment variables XONSHRC and XONSHRC_DIR are no longer updated by xonsh on startup according to which files were actually loaded. This caused problems if xonsh is called recursively, as the child shells would inherit the modified startup environment of the parent. These variables will now be left untouched, and the actual RC files loaded (according to those variables and command line arguments) can be seen in the output of xonfig.
    • Replaced xontrib-linuxbrew <https://github.com/eugenesvk/xontrib-linuxbrew>_ with xontrib-homebrew <https://github.com/eugenesvk/xontrib-homebrew>_, which also supports Homebrew on macOS

    Removed:

    • Completely dropped the deprecated --config-path argument, which no longer did anything.
    • The environment variable LOADED_RC_FILES is no longer set. It contained a list of booleans as to which RC files had been successfully loaded, but it required knowledge of the RC loading internals to interpret which status corresponded to which file. As above, the (successfully) loaded RC files are now shown in xonfig.

    Fixed:

    • Add quotes in autocomplete when filename contains brackets
    • Handle None value on XSH.env if $UPDATE_OS_ENVIRON is set to True
    • Implemented __hash__ method to Env, so that it can be used in lru_cache without crashing.
    • Make sure aliases are always captured regardless of $XONSH_CAPTURE_ALWAYS
    • fromdircolors doesn't crash if output from subprocess call to dircolors returns nothing (usually due to permission errors)
    • Fixed issue with environment not being iterable on session objects.
    • Fixed issue where environment is None in commands cache.
    • ${...}.swap() can be called from multiple threads safetly.
    • Piping multiple function aliases doesn't raise a recursion error anymore.
    • Fixed detection of App Execution Alias for latest 3.8 and 3.9 releases
    • Jedi completer doesn't complete paths with ~.
    • Sometimes the completion menu doesn't take space when cursor is at the bottom of the screen.
    • vox now passes system-site-packages option
    • Fix Duplicate paths left over when add paths to Path via xonsh.tools.EnvPath
    • Fix Crash with FileNotFoundError when current working directory is deleted #4467
    • Completing a single-arg python code segment (e.g. @(/etc/hos<TAB>)).
    • Fixed pipelines in WSL2
    • Newline symbols in Prompt-toolkit's completions are replaced by
    • Fix launching processes on Windows by using full paths (https://bugs.python.org/issue8557)
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.11.0.tar.gz(12.08 MB)
    xonsh-x86_64.AppImage(25.67 MB)
  • 0.10.1(Jul 24, 2021)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.10.1.tar.gz(12.06 MB)
    xonsh-x86_64.AppImage(24.54 MB)
  • 0.10.0(Jul 24, 2021)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.10.0.tar.gz(12.06 MB)
    xonsh-x86_64.AppImage(24.55 MB)
  • 0.9.27(Mar 3, 2021)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.27.tar.gz(12.12 MB)
    xonsh-x86_64.AppImage(25.01 MB)
  • 0.9.26(Feb 4, 2021)

  • 0.9.25(Jan 29, 2021)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.25.tar.gz(10.44 MB)
    xonsh-x86_64.AppImage(25.35 MB)
  • 0.9.24(Oct 16, 2020)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.24.tar.gz(10.37 MB)
    xonsh-x86_64.AppImage(24.85 MB)
  • 0.9.23(Oct 8, 2020)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.23.tar.gz(10.37 MB)
    xonsh-x86_64.AppImage(23.99 MB)
  • 0.9.22(Sep 16, 2020)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.22.tar.gz(10.35 MB)
    xonsh-x86_64.AppImage(24.97 MB)
  • 0.9.21(Sep 2, 2020)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.21.tar.gz(10.35 MB)
    xonsh-x86_64.AppImage(24.84 MB)
  • 0.9.20(Aug 26, 2020)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.20.tar.gz(10.35 MB)
    xonsh-x86_64.AppImage(24.79 MB)
  • 0.9.19(Aug 9, 2020)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.19.tar.gz(2.41 MB)
  • 0.9.18(May 5, 2020)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.18.tar.gz(2.39 MB)
  • 0.9.17(Apr 8, 2020)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.17.tar.gz(2.40 MB)
  • 0.9.16(Apr 7, 2020)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.16.tar.gz(2.40 MB)
  • 0.9.15(Mar 19, 2020)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.15.tar.gz(2.40 MB)
  • 0.9.14(Feb 28, 2020)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.14.tar.gz(2.40 MB)
  • 0.9.13(Oct 15, 2019)

    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
    Source code(tar.gz)
    Source code(zip)
    xonsh-0.9.13.tar.gz(2.31 MB)
Owner
xonsh
Python-powered, cross-platform, Unix-gazing shell
xonsh
iTerm2 Shell integration for Xonsh shell.

iTerm2 Shell Integration iTerm2 Shell integration for Xonsh shell. Installation To install use pip: xpip install xontrib-iterm2 # or: xpip install -U

Noorhteen Raja NJ 6 Dec 29, 2022
Bear-Shell is a shell based in the terminal or command prompt.

Bear-Shell is a shell based in the terminal or command prompt. You can navigate files, run python files, create files via the BearUtils text editor, and a lot more coming up!

MichaelBear 6 Dec 25, 2021
Bear-Shell is a shell based in the terminal or command prompt.

Bear-Shell is a shell based in the terminal or command prompt. You can navigate files, run python files, create files via the BearUtils text editor, and a lot more coming up!

MichaelBear 6 Dec 25, 2021
adds flavor of interactive filtering to the traditional pipe concept of UNIX shell

percol __ ____ ___ ______________ / / / __ \/ _ \/ ___/ ___/ __ \/ / / /_/ / __/ / / /__/ /_/ / / / .__

Masafumi Oyamada 3.2k Jan 7, 2023
A Python-based command prompt concept which includes windows command emulation.

PythonCMD A Python-based command prompt concept which includes windows command emulation. Current features: echo: Input your message and it will be cl

null 1 Feb 5, 2022
🖥️ A cross-platform modern shell.

Ergonomica WARNING: master on this repository is not the same as a stable release! Currently, this software is purely experimental, as I am cleaning i

null 813 Dec 27, 2022
(BionicLambda Universal SHell) A simple shell made in Python. Docs and possible C port incoming.

blush ?? (BionicLambda Universal SHell) A simple shell made in Python. Docs and possible C port incoming. Note: The Linux executables were made on Ubu

null 3 Jun 30, 2021
ICMP Reverse Shell written in Python 3 and with Scapy (backdoor/rev shell)

icmpdoor - ICMP Reverse Shell icmpdoor is an ICMP rev shell written in Python3 and scapy. Tested on Ubuntu 20.04, Debian 10 (Kali Linux), and Windows

Jeroen van Kessel 206 Dec 29, 2022
Kubernetes shell: An integrated shell for working with the Kubernetes

kube-shell Kube-shell: An integrated shell for working with the Kubernetes CLI Under the hood kube-shell still calls kubectl. Kube-shell aims to provi

CloudNative Labs 2.2k Jan 8, 2023
gcptree - Like the unix tree command but for GCP Org Heirarchy

gcptree Like the unix tree command but for GCP Org Heirarchy. For a note on coloring, the org node is green, folders and blue, and projects that are n

Ryan Canty 25 Sep 6, 2022
Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems.

Baselining, on steroids! Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems. The proje

Nelson 4 Dec 9, 2022
A CLI Spigot plugin manager that adheres to Unix conventions and Python best practices.

Spud A cross-platform, Spigot plugin manager that adheres to the Unix philosophy and Python best practices. Some focuses of the project are: Easy and

Tommy Dougiamas 9 Dec 2, 2022
liquidctl – liquid cooler control Cross-platform tool and drivers for liquid coolers and other devices

Cross-platform CLI and Python drivers for AIO liquid coolers and other devices

null 1.7k Jan 8, 2023
Simple CLI prompt for easy I/O with OpenAI's API

openai-cli-prompt Simple CLI prompt for easy I/O with OpenAI's API Quickstart Create a .env file with: OPENAI_API_KEY=<Your OpenAI API Key> Configure

Erik Nomitch 1 Oct 12, 2021
Yet another bash/zsh prompt script

Here we have yet another script for Git-aware customization of the command prompt in Bash and zsh. Unlike all the other scripts, I wrote this one, so

John T. Wodder II 5 Oct 13, 2021
The project help you to quickly build layouts in terminal,cross-platform

The project help you to quickly build layouts in terminal,cross-platform

gojuukaze 133 Nov 30, 2022
TUIFIManager - A cross-platform terminal-based file manager

TUIFI Manager A cross-platform terminal-based file manager (and component), mean

null 142 Dec 26, 2022
WebApp Maker make web apps (Duh). It is open source and make with python and shell.

WebApp Maker make web apps (Duh). It is open source and make with python and shell. This app can take any website and turn it into an app. I highly recommend turning these few websites into webapps: - Krunker.io (Fps Game) - play.fancade.com (Minigame Arcade) - Your Own Website If You Have One Apart from that enjoy my app By 220735540 (a.k.a RP400)

null 2 Jan 9, 2022
Standalone script written in Python 3 for generating Reverse Shell one liner snippets and handles the communication between target and client using custom Netcat binaries

Standalone script written in Python 3 for generating Reverse Shell one liner snippets and handles the communication between target and client using custom Netcat binaries. It automates the boring stuff like URL encoding the command and setting up a listener.

Yash Bhardwaj 3 Sep 27, 2022