xonsh

Python-powered cross-platform shell

TLDR

Start xonsh
$ xonsh
Run command
$ xonsh -c "[print('hello')]"
Run script
$ xonsh [script.xsh]
Interactive Python mode
$ xonsh -i

SYNOPSIS

xonsh [-c command] [-i] [options] [file]

DESCRIPTION

xonsh is a cross-platform shell that combines the capabilities of Python with the familiarity of traditional Unix shells. It allows users to seamlessly mix Python expressions and standard shell commands in the same session, using Python syntax as the primary language while supporting conventional shell operations.The shell provides context-aware tab completion, syntax highlighting, and a customizable prompt. Shell commands run natively, and Python code can be used anywhere for variable manipulation, control flow, and data processing. Scripts use the .xsh extension and can contain both Python and shell syntax.xonsh runs on any platform where Python is available, making it a portable choice for users who want Python's expressiveness integrated directly into their shell workflow.

PARAMETERS

-c CMD

Execute command.
-i
Interactive mode.
--login
Login shell.
--help
Show help.

INSTALL

sudo dnf install xonsh
sudo pacman -S xonsh
sudo zypper install xonsh
brew install xonsh
nix profile install nixpkgs#xonsh

CAVEATS

Python required. Different from bash. Learning curve.

HISTORY

xonsh was created to combine the power of Python with the familiarity of shell scripting.

SEE ALSO

bash(1), zsh(1), python(1), fish(1)