Skip to content

Commit

Permalink
plugins: Add starship plugin (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
Heus-Sueh authored Nov 14, 2024
1 parent 5ce9fad commit bea9353
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
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

0 comments on commit bea9353

Please sign in to comment.