LinuxCommandLibrary

xonsh

Python-powered cross-platform shell

TLDR

Start xonsh

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

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.

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)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community