浏览代码

feat(starship): create plugin (#10947)

Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
Andrew Xie 1 年之前
父节点
当前提交
07454029bd
共有 3 个文件被更改,包括 30 次插入0 次删除
  1. 1 0
      .github/CODEOWNERS
  2. 21 0
      plugins/starship/README.md
  3. 8 0
      plugins/starship/starship.plugin.zsh

+ 1 - 0
.github/CODEOWNERS

@@ -9,3 +9,4 @@ plugins/shell-proxy/                @septs
 plugins/universalarchive/           @Konfekt
 plugins/wp-cli/                     @joshmedeski
 plugins/zoxide/                     @ajeetdsouza
+plugins/starship/                   @axieax

+ 21 - 0
plugins/starship/README.md

@@ -0,0 +1,21 @@
+# starship plugin
+
+Initializes [starship prompt](https://starship.rs) - a minimal, blazing-fast and infinitely customizable cross-shell prompt.
+
+[Demo](https://user-images.githubusercontent.com/62098008/169764279-50b48262-9506-4651-ba89-f6611a88ebf0.mp4)
+
+[External repository](https://github.com/axieax/zsh-starship) for this zsh plugin.
+
+# Installation
+
+**Note:** you have to [install starship](https://starship.rs/guide/#%F0%9F%9A%80-installation) first.
+
+## [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh)
+
+Add `starship` to the plugins array in your `.zshrc` file:
+
+```zsh
+plugins=(... starship)
+```
+
+## ⚠️ ENABLING THIS PLUGIN WILL UNSET YOUR ZSH_THEME VARIABLE

+ 8 - 0
plugins/starship/starship.plugin.zsh

@@ -0,0 +1,8 @@
+# ignore oh-my-zsh theme
+unset ZSH_THEME
+
+if (( $+commands[starship] )); then
+  eval "$(starship init zsh)"
+else
+  echo '[oh-my-zsh] starship not found, please install it from https://starship.rs'
+fi