summaryrefslogtreecommitdiff
path: root/.config/fisher/github.com/matchai/spacefish/functions/__sf_section_ruby.fish
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2020-07-17 09:19:06 -0300
committerRoger Gonzalez <roger@rogs.me>2020-07-17 09:19:06 -0300
commit9fe9310ccf4971f0d1976f9bdaafd04a68ea314b (patch)
treeff1d5d677d5b3c33ac7eb6252029f2a9d165d9b3 /.config/fisher/github.com/matchai/spacefish/functions/__sf_section_ruby.fish
parent743caecfc68bb6d28f8de2e80bce671e42601c6a (diff)
Deleted fisher stuff
Diffstat (limited to '.config/fisher/github.com/matchai/spacefish/functions/__sf_section_ruby.fish')
-rw-r--r--.config/fisher/github.com/matchai/spacefish/functions/__sf_section_ruby.fish58
1 files changed, 0 insertions, 58 deletions
diff --git a/.config/fisher/github.com/matchai/spacefish/functions/__sf_section_ruby.fish b/.config/fisher/github.com/matchai/spacefish/functions/__sf_section_ruby.fish
deleted file mode 100644
index 9dbade61..00000000
--- a/.config/fisher/github.com/matchai/spacefish/functions/__sf_section_ruby.fish
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Ruby
-#
-# A dynamic, reflective, object-oriented, general-purpose programming language.
-# Link: https://www.ruby-lang.org/
-
-function __sf_section_ruby -d "Show current version of Ruby"
- # ------------------------------------------------------------------------------
- # Configuration
- # ------------------------------------------------------------------------------
-
- __sf_util_set_default SPACEFISH_RUBY_SHOW true
- __sf_util_set_default SPACEFISH_RUBY_PREFIX $SPACEFISH_PROMPT_DEFAULT_PREFIX
- __sf_util_set_default SPACEFISH_RUBY_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX
- __sf_util_set_default SPACEFISH_RUBY_SYMBOL "💎 "
- __sf_util_set_default SPACEFISH_RUBY_COLOR red
-
- # ------------------------------------------------------------------------------
- # Section
- # ------------------------------------------------------------------------------
-
- # Check if that user wants to show ruby version
- [ $SPACEFISH_RUBY_SHOW = false ]; and return
-
- # Show versions only for Ruby-specific folders
- if not test -f Gemfile \
- -o -f Rakefile \
- -o (count *.rb) -gt 0
- return
- end
-
- set -l ruby_version
-
- if type -q rvm-prompt
- set ruby_version (rvm-prompt i v g)
- else if type -q rbenv
- set ruby_version (rbenv version-name)
- else if type -q chruby
- set ruby_version $RUBY_AUTO_VERSION
- else if type -q asdf
- set ruby_version (asdf current ruby | awk '{print $1}')
- else
- return
- end
-
- [ -z "$ruby_version" -o "$ruby_version" = "system" ]; and return
-
- # Add 'v' before ruby version that starts with a number
- if test -n (echo (string match -r "^[0-9].+\$" "$ruby_version"))
- set ruby_version "v$ruby_version"
- end
-
- __sf_lib_section \
- $SPACEFISH_RUBY_COLOR \
- $SPACEFISH_RUBY_PREFIX \
- "$SPACEFISH_RUBY_SYMBOL""$ruby_version" \
- $SPACEFISH_RUBY_SUFFIX
-end