Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Plugin] adding starship #628

Merged
merged 4 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions plugins/starship/README.md
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions plugins/starship/starship.plugin.sh
Original file line number Diff line number Diff line change
@@ -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
Loading