mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-18 20:52:45 +08:00
Merge pull request #247 from Fryie/ruby_version_bira
This commit is contained in:
commit
e4a5202d64
|
@ -3,10 +3,9 @@
|
|||
Theme imported from Oh my ZSH: https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/bira.zsh-theme
|
||||
Contains traces of nuts and code from other Oh my fish themes.
|
||||
|
||||
Display username, hostname, current path and git status. Display the latest error status in the right prompt.
|
||||
Display username, hostname, current path, ruby version and git status. Display the latest error status in the right prompt.
|
||||
|
||||
![bira theme](https://raw.github.com/vincent-psarga/oh-my-fish/master/themes/bira/screenshot.png)
|
||||
![bira theme](https://cloud.githubusercontent.com/assets/1214238/5441541/8bd494dc-8491-11e4-9dbe-256b7e558eac.png)
|
||||
|
||||
TODO:
|
||||
- display Ruby version
|
||||
- display Python version
|
||||
|
|
|
@ -37,10 +37,23 @@ function __git_status
|
|||
end
|
||||
end
|
||||
|
||||
function __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)
|
||||
else
|
||||
set ruby_version "system"
|
||||
end
|
||||
|
||||
echo -n (set_color red) ‹$ruby_version› (set_color normal)
|
||||
end
|
||||
|
||||
function fish_prompt
|
||||
echo -n (set_color white)"╭─"(set_color normal)
|
||||
__user_host
|
||||
__current_path
|
||||
__ruby_version
|
||||
__git_status
|
||||
echo -e ''
|
||||
echo (set_color white)"╰─"(set_color --bold white)"\$ "(set_color normal)
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 30 KiB |
Loading…
Reference in New Issue
Block a user