diff --git a/plugins/starship/README.md b/plugins/starship/README.md new file mode 100644 index 000000000..30034b360 --- /dev/null +++ b/plugins/starship/README.md @@ -0,0 +1,13 @@ +# starship plugin + +Initializes [starship](https://github.com/starship/starship), the minimal, blazing-fast, and infinitely customizable prompt for any shell! + +To use it, add `starship` to the plugins array in your `.bashrc` file: + +```bash +plugins=(... starship) +``` + +**Note:** you have to [install starship](https://github.com/starship/starship?tab=readme-ov-file#step-1-install-starship) first. + +## ⚠️ ENABLING THIS PLUGIN WILL UNSET YOUR OSH_THEME VARIABLE diff --git a/plugins/starship/starship.plugin.sh b/plugins/starship/starship.plugin.sh new file mode 100644 index 000000000..0f36b8ee1 --- /dev/null +++ b/plugins/starship/starship.plugin.sh @@ -0,0 +1,10 @@ +#! bash oh-my-bash.module + +# Check if starship is installed +if _omb_util_command_exists starship; then + # ignore oh-my-bash theme + unset -v OSH_THEME + eval "$(starship init bash)" +else + echo '[oh-my-bash] starship not found, please install it from https://github.com/starship/starship' +fi