From f82211af9aa7bb7d9997b76d73d4197691c73d81 Mon Sep 17 00:00:00 2001 From: Heus-Sueh Date: Mon, 14 Oct 2024 11:12:30 -0400 Subject: [PATCH 1/4] adding starship --- plugins/starship/README.md | 12 ++++++++++++ plugins/starship/starship.plugin.sh | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100644 plugins/starship/README.md create mode 100644 plugins/starship/starship.plugin.sh diff --git a/plugins/starship/README.md b/plugins/starship/README.md new file mode 100644 index 000000000..aa2e0b997 --- /dev/null +++ b/plugins/starship/README.md @@ -0,0 +1,12 @@ +# starship plugin + +Initializes [starship](https://github.com/starship/starship), the minimal, blazing-fast, and infinitely customizable prompt for any shell! + +![Tutorial](https://starship.rs/demo.webm) +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. diff --git a/plugins/starship/starship.plugin.sh b/plugins/starship/starship.plugin.sh new file mode 100644 index 000000000..4ea63781f --- /dev/null +++ b/plugins/starship/starship.plugin.sh @@ -0,0 +1,8 @@ +#! bash oh-my-bash.module + +# Check if starship is installed +if _omb_util_command_exists starship; then + eval "$(starship init bash)" +else + echo '[oh-my-bash] starship not found, please install it from https://github.com/starship/starship' +fi From 7336b2ced02f5be5afa441702e9e0c7d189a59f3 Mon Sep 17 00:00:00 2001 From: Heus-Sueh Date: Mon, 14 Oct 2024 11:14:29 -0400 Subject: [PATCH 2/4] removing the tutorial --- plugins/starship/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/starship/README.md b/plugins/starship/README.md index aa2e0b997..e4d37b5ec 100644 --- a/plugins/starship/README.md +++ b/plugins/starship/README.md @@ -2,7 +2,6 @@ Initializes [starship](https://github.com/starship/starship), the minimal, blazing-fast, and infinitely customizable prompt for any shell! -![Tutorial](https://starship.rs/demo.webm) To use it, add `starship` to the plugins array in your `.bashrc` file: ```bash From 0aa5707a45c6857c129f99dbaee078052c8f1d96 Mon Sep 17 00:00:00 2001 From: Heus-Sueh Date: Tue, 15 Oct 2024 11:58:32 -0300 Subject: [PATCH 3/4] warning users that starship overrides zsh_theme --- plugins/starship/README.md | 2 ++ plugins/starship/starship.plugin.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/plugins/starship/README.md b/plugins/starship/README.md index e4d37b5ec..30034b360 100644 --- a/plugins/starship/README.md +++ b/plugins/starship/README.md @@ -9,3 +9,5 @@ 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 index 4ea63781f..d1dad0e37 100644 --- a/plugins/starship/starship.plugin.sh +++ b/plugins/starship/starship.plugin.sh @@ -2,6 +2,8 @@ # Check if starship is installed if _omb_util_command_exists starship; then + # ignore oh-my-bash theme + unset OSH_THEME eval "$(starship init bash)" else echo '[oh-my-bash] starship not found, please install it from https://github.com/starship/starship' From cf370ce90ac9f60fd5a348a02d9cb130924966b9 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Thu, 14 Nov 2024 12:15:28 +0900 Subject: [PATCH 4/4] Update plugins/starship/starship.plugin.sh --- plugins/starship/starship.plugin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/starship/starship.plugin.sh b/plugins/starship/starship.plugin.sh index d1dad0e37..0f36b8ee1 100644 --- a/plugins/starship/starship.plugin.sh +++ b/plugins/starship/starship.plugin.sh @@ -3,7 +3,7 @@ # Check if starship is installed if _omb_util_command_exists starship; then # ignore oh-my-bash theme - unset OSH_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'