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:
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
File details
Details for the file xontrib-prompt-starship-0.3.4.tar.gz
.
File metadata
- Download URL: xontrib-prompt-starship-0.3.4.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2106d4e13618891f12657bd44f32ffba48cdeca18239031369de1a6fa4ff152b |
|
MD5 | e9b0a6807ae2f364bbc7ad1249f420f0 |
|
BLAKE2b-256 | adeff9ddeaedd27fffd9b4606d4191c09bd92d02821b2f7d72c3244299b1f13f |
File details
Details for the file xontrib_prompt_starship-0.3.4-py3-none-any.whl
.
File metadata
- Download URL: xontrib_prompt_starship-0.3.4-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3d9907c2e634fa2c38a6c45fd02cebc47ad863cdfdb3c7e925c4f76d4cc1842 |
|
MD5 | 2bb03c6f850ced905bf971331ce61ecb |
|
BLAKE2b-256 | fd278dd7c497dce93a6a11b68389eb188fe34e4f04e5b014a8f2e5af9b831cb7 |