summaryrefslogtreecommitdiff
path: root/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/rust.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/rust.zsh')
m---------dot-oh-my-zsh0
-rw-r--r--dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/rust.zsh42
2 files changed, 0 insertions, 42 deletions
diff --git a/dot-oh-my-zsh b/dot-oh-my-zsh
new file mode 160000
+Subproject 6fe84bf5c82da7b1f6d7c5ec3e5c447721ac8ce
diff --git a/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/rust.zsh b/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/rust.zsh
deleted file mode 100644
index 70bc0937..00000000
--- a/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/rust.zsh
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Rust
-#
-# Rust is a systems programming language sponsored by Mozilla Research.
-# Link: https://www.rust-lang.org
-
-# ------------------------------------------------------------------------------
-# Configuration
-# ------------------------------------------------------------------------------
-
-SPACESHIP_RUST_SHOW="${SPACESHIP_RUST_SHOW=true}"
-SPACESHIP_RUST_PREFIX="${SPACESHIP_RUST_PREFIX="$SPACESHIP_PROMPT_DEFAULT_PREFIX"}"
-SPACESHIP_RUST_SUFFIX="${SPACESHIP_RUST_SUFFIX="$SPACESHIP_PROMPT_DEFAULT_SUFFIX"}"
-SPACESHIP_RUST_SYMBOL="${SPACESHIP_RUST_SYMBOL="🦀 "}"
-SPACESHIP_RUST_COLOR="${SPACESHIP_RUST_COLOR="red"}"
-SPACESHIP_RUST_VERBOSE_VERSION="${SPACESHIP_RUST_VERBOSE_VERSION=false}"
-
-# ------------------------------------------------------------------------------
-# Section
-# ------------------------------------------------------------------------------
-
-# Show current version of Rust
-spaceship_rust() {
- [[ $SPACESHIP_RUST_SHOW == false ]] && return
-
- # If there are Rust-specific files in current directory
- [[ -f Cargo.toml || -n *.rs(#qN^/) ]] || return
-
- spaceship::exists rustc || return
-
- local rust_version=$(rustc --version | cut -d' ' -f2)
-
- if [[ $SPACESHIP_RUST_VERBOSE_VERSION == false ]]; then
- local rust_version=$(echo $rust_version | cut -d'-' -f1) # Cut off -suffixes from version. "v1.30.0-beta.11" or "v1.30.0-nightly"
- fi
-
- spaceship::section \
- "$SPACESHIP_RUST_COLOR" \
- "$SPACESHIP_RUST_PREFIX" \
- "${SPACESHIP_RUST_SYMBOL}v${rust_version}" \
- "$SPACESHIP_RUST_SUFFIX"
-}