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']())
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
Close
Hashes for xontrib-prompt-starship-0.3.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b4420f496de923993553c1dc50944338196e982d48d652132e967280f01867c |
|
MD5 | c9199a23f4bb5c332692baabbbaef915 |
|
BLAKE2b-256 | 345bc858bebb3577b3d6b219ebec2398520b2a8976250790c7c40bf25f8cbf67 |
Close
Hashes for xontrib_prompt_starship-0.3.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55bcb6d978e4ddd0a8aacb441f6f7dda90d3908f7ae1e32d015cae599f6d4790 |
|
MD5 | 7f1a57cbdf97558b2f4d056f4ff2f3f1 |
|
BLAKE2b-256 | d0d88760885606c9ff5c0750cf22be2e10713fd700c10d624ab35bcb7cf6017d |