Skip to main content

Starship prompt in xonsh shell.

Project description

Starship cross-shell prompt in xonsh shell.

If you like the idea click ⭐ on the repo and tweet.

Additional features:

  • You can split the prompt to left, right and bottom parts.

Installation

To install use pip:

# You already have Starship installed. Then:
xpip install xontrib-prompt-starship
# or: xpip install -U git+https://github.com/anki-code/xontrib-prompt-starship

Usage

xontrib load prompt_starship

Recommendation

We suggest to use @ character to remember about you're using xonsh syntax and to potentially spread the word about xonsh if you make a screenshot or show your terminal to friends or collegues:

mkdir -p ~/.config/ && echo @("""
[character]
success_symbol = "[@](bold green)"
error_symbol = "[@](bold red)"
""".strip()) > ~/.config/starship_xonsh.toml

$STARSHIP_CONFIG = '~/.config/starship_xonsh.toml'
xontrib load prompt_starship

Configuration

You can set the different starship configs for left, right and bottom parts of prompt when your shell type is prompt-toolkit:

$XONTRIB_PROMPT_STARSHIP_LEFT_CONFIG = "~/.config/starship_xonsh_left.toml"
$XONTRIB_PROMPT_STARSHIP_RIGHT_CONFIG = "~/.config/starship_xonsh_right.toml"
$XONTRIB_PROMPT_STARSHIP_BOTTOM_CONFIG = "~/.config/starship_xonsh_bottom.toml"
xontrib load prompt_starship

In case of using starship as part of another prompt you can add starship prompt to $PROMPT_FIELDS without replacing the current prompt:

$XONTRIB_PROMPT_STARSHIP_REPLACE_PROMPT = False
xontrib load prompt_starship
print($PROMPT_FIELDS['starship_left']())

Prompt bar with starship:

Prompt bar with starship sections.

Known issues

Credits

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xontrib-prompt-starship-0.3.5.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

xontrib_prompt_starship-0.3.5-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file xontrib-prompt-starship-0.3.5.tar.gz.

File metadata

File hashes

Hashes for xontrib-prompt-starship-0.3.5.tar.gz
Algorithm Hash digest
SHA256 541ee0ec3d7014f0ad72c9c1d4a7b729d3050bd4b46a16be5ad842be54062c8e
MD5 3253d983aa4746c65ea2c812caabb488
BLAKE2b-256 d28ef7a9095c2a1a017a78d5b13552964b0dee456603837f0a052706489a55a9

See more details on using hashes here.

File details

Details for the file xontrib_prompt_starship-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for xontrib_prompt_starship-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 55a90a1efd9e84b1c7dc8df9e815da51ac5034f9b0654e8bf433fb41c996ed49
MD5 fccf2ceac20707e04e84e0576871cc68
BLAKE2b-256 9c2bcf3d1c9319a0110fb4acd1d3ed4717f056f2a1874e9bf7608d75a4dde036

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page