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
Monochrome prompt
See also starship-prompt-mono:
Known issues
- Prompt toolkit issue: the right prompt at the bottom.
- The using of bottom toolbar is not properly tested and adopted to cute appearance.
Credits
- The xontrib-prompt-starship can be used as part of xontrib-prompt-bar.
- This package is the part of ergopack - the pack of ergonomic xontribs.
- This package was created with xontrib cookiecutter template.
- Adding support for xonsh inside Starship
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xontrib_prompt_starship-0.3.7.tar.gz.
File metadata
- Download URL: xontrib_prompt_starship-0.3.7.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57f542e3018a055f0502467de489ddca60a3a710ff08146dd63799811ed9df9e
|
|
| MD5 |
1bd3fb57a70fbd104ae65ad0b76eb580
|
|
| BLAKE2b-256 |
8e88e468c55e45de390decebfb3c465f9e35e2aacbcc2bebf8e417ad33953f83
|
File details
Details for the file xontrib_prompt_starship-0.3.7-py3-none-any.whl.
File metadata
- Download URL: xontrib_prompt_starship-0.3.7-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12a213fc454c9547c6426d19c4a43982be48500019378267bdab465d0749dccd
|
|
| MD5 |
216150c332cfa04e19e312efcc114840
|
|
| BLAKE2b-256 |
9471968450a151d003bb80ed6fbfb190f22cfac076cbd4442dc58b48c5545644
|