anki-code / xontrib-prompt-starship

Starship cross-shell prompt in xonsh shell.
MIT License
51 stars 8 forks source link

Set `$STARSHIP_SHELL = "xonsh"` instead of "sh" #4

Closed mattmc3 closed 2 years ago

mattmc3 commented 2 years ago

Xonsh is supported natively in starship now (see /usr/local/bin/starship init xonsh --print-full-init), and each supported shell sets the $STARSHIP_SHELL variable to the running shell. This project just defaults that variable to "sh", which is not ideal. It means that adding custom sections to the starship.toml file for different shells can't simply check this variable is "xonsh" as a conditional.

This issue is a proposal to change this line to use 'xonsh' instead of 'sh': https://github.com/anki-code/xontrib-prompt-starship/blob/cd031590c9c0a78c919b02dadc15ce093046ee45/xontrib/prompt_starship.py#L5

anki-code commented 2 years ago

Hi! PR is very welcome!