oh-my-fish/themes/l/fish_right_prompt.fish
Rahul Trikha 6ae22a5950 Merged lambda theme into l
Added a set fish_theme_l_right_prompt true variable to activate the right_prompt for l
2015-03-11 01:03:27 +10:30

29 lines
631 B
Fish

# To show the right prompt please set
# set fish_theme_l_right_prompt true (config.fish)
if test "$fish_theme_l_right_prompt" = true
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
set -l red (set_color red)
set -l normal (set_color normal)
set ruby_info $red(_ruby_version)
if [ (_ruby_gemset) ]
set -l ruby_gemset $red(_ruby_gemset)
set ruby_info "$ruby_info@$ruby_gemset"
end
echo -n -s $ruby_info $normal
end
end