mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-03-27 18:25:12 +08:00
display ruby version
This commit is contained in:
parent
699e221ad9
commit
aee49875fa
@ -3,10 +3,9 @@
|
|||||||
Theme imported from Oh my ZSH: https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/bira.zsh-theme
|
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.
|
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.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- display Ruby version
|
|
||||||
- display Python version
|
- display Python version
|
||||||
|
@ -37,10 +37,23 @@ function __git_status
|
|||||||
end
|
end
|
||||||
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
|
function fish_prompt
|
||||||
echo -n (set_color white)"╭─"(set_color normal)
|
echo -n (set_color white)"╭─"(set_color normal)
|
||||||
__user_host
|
__user_host
|
||||||
__current_path
|
__current_path
|
||||||
|
__ruby_version
|
||||||
__git_status
|
__git_status
|
||||||
echo -e ''
|
echo -e ''
|
||||||
echo (set_color white)"╰─"(set_color --bold white)"\$ "(set_color normal)
|
echo (set_color white)"╰─"(set_color --bold white)"\$ "(set_color normal)
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 30 KiB |
Loading…
x
Reference in New Issue
Block a user