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. Add this to your ~/.config/starship.toml:

[character]
success_symbol = "[@](bold green)"
error_symbol = "[@](bold red)"

If you're using Starship for both for another shell and for xonsh and you want to have different characters you can just put the lines above to the new ~/.config/starship_xonsh.toml file. Then you should add to the ~/.xonshrc:

$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']())

Result:

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.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for xontrib-prompt-starship-0.3.1.tar.gz
Algorithm Hash digest
SHA256 09dc3ec476570dc06375c01a2f7f5ceaede76aa07dede0b0faecd60f129f3ccf
MD5 a7bd552f257dd0a0f1e7539342fd6599
BLAKE2b-256 789cb24ace21946bb1e0aff0724ed0b01e8f39bdc7b3c7ede573dec6e0879f3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xontrib_prompt_starship-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c2672c0876e510b878774027cfce97d1e9165f7b245aa903a14ba61bbfa4644f
MD5 09804a8536eac81d678ba0a3da500c44
BLAKE2b-256 254ce339ec1e1da0ac24292d0a2845855ed1c6e13211918b5ac52cbddd7bf9ff

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