Xonsh Enrichment Proposal 2
New XEP-2 is waiting for review.
Xonsh is a Python-powered, cross-platform, Unix-gazing shell language and command prompt. The language is a superset of Python 3.5+ with additional shell primitives that you are used to from Bash and IPython. It works on all major systems including Linux, OSX, and Windows. Xonsh is meant for the daily use of experts and novices.
Install Documentation GithubThe xonsh shell has powerful language that used both for programming on Python and shell commands execution.
The xonsh language has additional shell primitives that you are used to from Bash. Read more →
cd /home cat /etc/passwd | grep root ls -la
The xonsh language is a superset of Python 3.5+ and you can run Python code and import modules. Read more →
2 + 2 import json j = json.loads('{"Hello": "world!", "Answer": 42}') print(j['Answer'])
With xonsh language you can write python code combining with the shell commands. Read more →
len($(curl -L https://xon.sh)) for filename in `.*`: print(filename) du -sh @(filename)
Prepare environment variables and arguments in Python and use it in the shell commands. Read more →
var = 'he' + 'llo' echo @(var) > /tmp/@(var) echo @(i for i in range(42))
Xonsh is a super-charged shell that enables you to work quickly and effectively! Some of the features that help set xonsh apart are:
The language is a superset of Python 3.5+ with additional shell primitives that you are used to from Bash and IPython.
Xontributions, or xontribs, are a set of tools and conventions for extending the functionality of xonsh beyond what is provided by default.
The xonsh shell implements a collection of history files that have rich structure and API for discover them.
Customisable tab completion, key bindings, color styles are on board by default.
Xonsh can be installed and run with various package managers, by using appimage, or from a docker container.
AppImage is a format for distributing portable software on Linux without needing superuser permissions to install the application. The xonsh AppImage file contains both xonsh and Python and allows xonsh to be run on any AppImage-supported Linux distribution without installation or root access.
Download and run:
wget https://github.com/xonsh/xonsh/releases/latest/download/xonsh-x86_64.AppImage chmod +x xonsh-x86_64.AppImage ./xonsh-x86_64.AppImageLearn more →
Xonsh publishes a handful of containers, primarily targeting CI and automation use cases. All of them are published on Docker Hub.
Run the xonsh shell in the small size docker container:
docker run -it --rm xonsh/xonsh:slim
OSX brew:
brew install xonsh
Debian/Ubuntu apt:
apt install xonsh
Arch Linux pacman:
pacman -S xonsh
Fedore dnf:
dnf install xonsh
Xontributions, or xontribs, are a set of tools and conventions for extending the functionality of xonsh beyond what is provided by default.
Let your pipe lines from the standard output flow thru the Python code in the xonsh shell.
Get identifiers, paths, URLs and words from the previous command output and use them for the next command in the xonsh shell.
Return to the most recently used directory when starting the xonsh shell.
Argcomplete support to tab completion of python and xonsh scripts in the xonsh shell.
Most interesting publications around xonsh.
A. Scopatz and G. Forsyth gave a two hour presentation of xonsh.