mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-02-12 12:21:00 +01:00
Create go_prompt_info to add go version to prompts
This commit is contained in:
7
lib/golang.zsh
Normal file
7
lib/golang.zsh
Normal file
@@ -0,0 +1,7 @@
|
||||
# get the golang version
|
||||
function go_prompt_info() {
|
||||
local go_prompt
|
||||
go_prompt=$(go version | awk '{ print substr($3, 3) }')
|
||||
[[ "${go_prompt}x" == "x" ]] && return
|
||||
echo "${ZSH_THEME_GO_PROMPT_PREFIX}${go_prompt}${ZSH_THEME_GO_PROMPT_SUFFIX}"
|
||||
}
|
||||
Reference in New Issue
Block a user