diff options
Diffstat (limited to 'dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/golang.zsh')
| m--------- | dot-oh-my-zsh | 0 | ||||
| -rw-r--r-- | dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/golang.zsh | 41 |
2 files changed, 0 insertions, 41 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/golang.zsh b/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/golang.zsh deleted file mode 100644 index 9e5cfdc2..00000000 --- a/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/golang.zsh +++ /dev/null @@ -1,41 +0,0 @@ -# -# Go -# -# Go is an open source programming language that makes it easy -# to build efficient software. -# Link: https://golang.org/ - -# ------------------------------------------------------------------------------ -# Configuration -# ------------------------------------------------------------------------------ - -SPACESHIP_GOLANG_SHOW="${SPACESHIP_GOLANG_SHOW=true}" -SPACESHIP_GOLANG_PREFIX="${SPACESHIP_GOLANG_PREFIX="$SPACESHIP_PROMPT_DEFAULT_PREFIX"}" -SPACESHIP_GOLANG_SUFFIX="${SPACESHIP_GOLANG_SUFFIX="$SPACESHIP_PROMPT_DEFAULT_SUFFIX"}" -SPACESHIP_GOLANG_SYMBOL="${SPACESHIP_GOLANG_SYMBOL="🐹 "}" -SPACESHIP_GOLANG_COLOR="${SPACESHIP_GOLANG_COLOR="cyan"}" - -# ------------------------------------------------------------------------------ -# Section -# ------------------------------------------------------------------------------ - -spaceship_golang() { - [[ $SPACESHIP_GOLANG_SHOW == false ]] && return - - # If there are Go-specific files in current directory, or current directory is under the GOPATH - [[ -f go.mod || -d Godeps || -f glide.yaml || -n *.go(#qN^/) || -f Gopkg.toml || -f Gopkg.lock \ - || ( $GOPATH && "$PWD/" =~ "$GOPATH/" ) ]] || return - - spaceship::exists go || return - - # Go version is either the commit hash and date like "devel +5efe9a8f11 Web Jan 9 07:21:16 2019 +0000" - # at the time of the build or a release tag like "go1.11.4". - # https://github.com/spaceship-prompt/spaceship-prompt/issues/610 - local go_version=$(go version | awk '{ if ($3 ~ /^devel/) {print $3 ":" substr($4, 2)} else {print "v" substr($3, 3)} }') - - spaceship::section \ - "$SPACESHIP_GOLANG_COLOR" \ - "$SPACESHIP_GOLANG_PREFIX" \ - "${SPACESHIP_GOLANG_SYMBOL}${go_version}" \ - "$SPACESHIP_GOLANG_SUFFIX" -} |
