Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
b67fde9a
Commit
b67fde9a
authored
Nov 23, 2014
by
Justin Hileman
Committed by
Bruno Pinto
Nov 28, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bobthefish] Add support for rbenv and RVM
parent
a81b1fcc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
themes/bobthefish/README.md
themes/bobthefish/README.md
+2
-0
themes/bobthefish/fish_prompt.fish
themes/bobthefish/fish_prompt.fish
+18
-0
No files found.
themes/bobthefish/README.md
View file @
b67fde9a
...
...
@@ -28,6 +28,8 @@ This theme is based loosely on [agnoster][agnoster].
*
Background jobs (%)
*
You currently have superpowers ($)
*
User@Host (unless you're the default user)
*
Current RVM or rbenv (Ruby) version
*
Current virtualenv (Python) version
*
Abbreviated parent directory
*
Current directory, or Git or Mercurial project name
*
Current project's repo branch ( master) or detached head (➦ d0dfd9b)
...
...
themes/bobthefish/fish_prompt.fish
View file @
b67fde9a
...
...
@@ -46,6 +46,7 @@ set __bobthefish_dk_green 0c4801
set __bobthefish_lt_red C99
set __bobthefish_med_red ce000f
set __bobthefish_dk_red 600
set __bobthefish_ruby_red af0000
set __bobthefish_slate_blue 255e87
set __bobthefish_med_blue 005faf
...
...
@@ -337,6 +338,22 @@ function __bobthefish_prompt_virtualfish -d "Display activated virtual environme
set_color normal
end
function __bobthefish_prompt_rubies -d 'Display current Ruby (rvm/rbenv)'
set -l ruby_version
if type rvm-prompt >/dev/null
set ruby_version (rvm-prompt i v g)
else if type rbenv >/dev/null
set ruby_version (rbenv version-name)
# Don't show global ruby version...
[ "$ruby_version" = (rbenv global) ]; and return
end
test -w "$ruby_version"; and return
__bobthefish_start_segment $__bobthefish_ruby_red $__bobthefish_lt_grey --bold
echo -n -s $ruby_version ' '
set_color normal
end
# ===========================
# Apply theme
...
...
@@ -345,6 +362,7 @@ end
function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
__bobthefish_prompt_status
__bobthefish_prompt_user
__bobthefish_prompt_rubies
__bobthefish_prompt_virtualfish
set -l git_root (__bobthefish_git_project_dir)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment