diff --git a/themes/bira/README.md b/themes/bira/README.md index 0714bbe..3003df9 100644 --- a/themes/bira/README.md +++ b/themes/bira/README.md @@ -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 diff --git a/themes/bira/fish_prompt.fish b/themes/bira/fish_prompt.fish index 58cf035..f6558ae 100644 --- a/themes/bira/fish_prompt.fish +++ b/themes/bira/fish_prompt.fish @@ -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) diff --git a/themes/bira/screenshot.png b/themes/bira/screenshot.png deleted file mode 100644 index 232d739..0000000 Binary files a/themes/bira/screenshot.png and /dev/null differ