Merge branch 'rahult-lambda-theme'

This commit is contained in:
Jorge 2015-03-11 08:32:00 +09:00
commit 139e14c34c
2 changed files with 42 additions and 2 deletions

View File

@ -0,0 +1,29 @@
# To show the right prompt please set
# set theme_display_rbenv 'yes' (config.fish)
# set theme_display_rbenv_gemset 'yes' (config.fish)
function _ruby_version
echo (command rbenv version-name | sed 's/\n//')
end
function _ruby_gemset
echo (command rbenv gemset active ^/dev/null | sed -e 's| global||')
end
function fish_right_prompt
if [ "$theme_display_rbenv" = 'yes' ]
set -l red (set_color red)
set -l normal (set_color normal)
set ruby_info $red(_ruby_version)
if [ "$theme_display_rbenv_gemset" = 'yes' ]
if [ (_ruby_gemset) ]
set -l ruby_gemset $red(_ruby_gemset)
set ruby_info "$ruby_info@$ruby_gemset"
end
end
echo -n -s $ruby_info $normal
end
end

View File

@ -6,9 +6,20 @@ A theme inspired by [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh/blob/m
![](http://f.cl.ly/items/2S25360U1p360E0D2u2g/3.png)
![](http://f.cl.ly/items/1w0s0Q3x3r2Z1F1l011k/4.png)
#### Characteristics
* Current branch
* Dirty working directory
* Working directory
* Working directory
Only if fish_theme_l_right_prompt variable is set true within config.fish
```fish
set theme_display_rbenv 'yes'
set theme_display_rbenv_gemset 'yes'
```
* Rbenv Ruby Version
* Rbenv Ruby Gemset
![](http://f.cl.ly/items/0f0k3o2L3y2q1L3g1R1X/5.png)