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
7154875c
Commit
7154875c
authored
Mar 10, 2015
by
Rahul Trikha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated l theme to have rbenv support
parent
6ae22a59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
themes/l/fish_right_prompt.fish
themes/l/fish_right_prompt.fish
+15
-14
themes/l/readme.md
themes/l/readme.md
+2
-1
No files found.
themes/l/fish_right_prompt.fish
View file @
7154875c
# To show the right prompt please set
# To show the right prompt please set
# set fish_theme_l_right_prompt true (config.fish)
# set theme_display_rbenv 'yes' (config.fish)
# set theme_display_rbenv_gemset 'yes' (config.fish)
if test "$fish_theme_l_right_prompt" = true
function _ruby_version
echo (command rbenv version-name | sed 's/\n//')
function _ruby_version
end
echo (command rbenv version-name | sed 's/\n//')
end
function _ruby_gemset
function _ruby_gemset
echo (command rbenv gemset active ^/dev/null | sed -e 's| global||')
echo (command rbenv gemset active ^/dev/null | sed -e 's| global||')
end
end
function fish_right_prompt
function fish_right_prompt
if [ "$theme_display_rbenv" = 'yes' ]
set -l red (set_color red)
set -l red (set_color red)
set -l normal (set_color normal)
set -l normal (set_color normal)
set ruby_info $red(_ruby_version)
set ruby_info $red(_ruby_version)
if [ (_ruby_gemset) ]
if [ "$theme_display_rbenv_gemset" = 'yes' ]
set -l ruby_gemset $red(_ruby_gemset)
if [ (_ruby_gemset) ]
set ruby_info "$ruby_info@$ruby_gemset"
set -l ruby_gemset $red(_ruby_gemset)
set ruby_info "$ruby_info@$ruby_gemset"
end
end
end
echo -n -s $ruby_info $normal
echo -n -s $ruby_info $normal
end
end
end
end
themes/l/readme.md
View file @
7154875c
...
@@ -15,7 +15,8 @@ A theme inspired by [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh/blob/m
...
@@ -15,7 +15,8 @@ A theme inspired by [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh/blob/m
Only if fish_theme_l_right_prompt variable is set true within config.fish
Only if fish_theme_l_right_prompt variable is set true within config.fish
```
fish
```
fish
set fish_theme_l_right_prompt true
set theme_display_rbenv 'yes'
set theme_display_rbenv_gemset 'yes'
```
```
*
Rbenv Ruby Version
*
Rbenv Ruby Version
...
...
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