diff options
author | Roger Gonzalez <roger@rogs.me> | 2020-07-17 09:19:06 -0300 |
---|---|---|
committer | Roger Gonzalez <roger@rogs.me> | 2020-07-17 09:19:06 -0300 |
commit | 9fe9310ccf4971f0d1976f9bdaafd04a68ea314b (patch) | |
tree | ff1d5d677d5b3c33ac7eb6252029f2a9d165d9b3 /.config/fisher/github.com/matchai/spacefish/functions/__sf_section_golang.fish | |
parent | 743caecfc68bb6d28f8de2e80bce671e42601c6a (diff) |
Deleted fisher stuff
Diffstat (limited to '.config/fisher/github.com/matchai/spacefish/functions/__sf_section_golang.fish')
-rw-r--r-- | .config/fisher/github.com/matchai/spacefish/functions/__sf_section_golang.fish | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/.config/fisher/github.com/matchai/spacefish/functions/__sf_section_golang.fish b/.config/fisher/github.com/matchai/spacefish/functions/__sf_section_golang.fish deleted file mode 100644 index 81211ee4..00000000 --- a/.config/fisher/github.com/matchai/spacefish/functions/__sf_section_golang.fish +++ /dev/null @@ -1,55 +0,0 @@ -# -# Go -# -# Go is an open source programming language that makes it easy -# to build efficient software. -# Link: https://golang.org/ - -function __sf_section_golang -d "Display the current go version if you're inside GOPATH" - # ------------------------------------------------------------------------------ - # Configuration - # ------------------------------------------------------------------------------ - - __sf_util_set_default SPACEFISH_GOLANG_SHOW true - __sf_util_set_default SPACEFISH_GOLANG_PREFIX $SPACEFISH_PROMPT_DEFAULT_PREFIX - __sf_util_set_default SPACEFISH_GOLANG_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX - __sf_util_set_default SPACEFISH_GOLANG_SYMBOL "🐹 " - __sf_util_set_default SPACEFISH_GOLANG_COLOR cyan - - # ------------------------------------------------------------------------------ - # Section - # ------------------------------------------------------------------------------ - - # Show the current version of Golang - [ $SPACEFISH_GOLANG_SHOW = false ]; and return - - # Ensure the go command is available - type -q go; or return - - if not test -f go.mod \ - -o -d Godeps \ - -o -f glide.yaml \ - -o (count *.go) -gt 0 \ - -o -f Gopkg.yml \ - -o -f Gopkg.lock \ - -o ([ (count $GOPATH) -gt 0 ]; and string match $GOPATH $PWD) - return - end - - set -l go_version (go version | string split ' ') - - # Go version is either the commit hash and date (devel +5efe9a8f11 Web Jan 9 07:21:16 2019 +0000) - # at the time of the build or a release tag (go1.11.4) - # https://github.com/matchai/spacefish/issues/137 - if test (string match 'devel*' $go_version[3]) - set go_version $go_version[3]":"(string sub -s 2 $go_version[4]) - else - set go_version "v"(string sub -s 3 $go_version[3]) - end - - __sf_lib_section \ - $SPACEFISH_GOLANG_COLOR \ - $SPACEFISH_GOLANG_PREFIX \ - "$SPACEFISH_GOLANG_SYMBOL""$go_version" \ - $SPACEFISH_GOLANG_SUFFIX -end |