Commit 36abf97c authored by Vincent Pretre's avatar Vincent Pretre Committed by Bruno Pinto

Added exit code in right prompt

Display name in red when user is root
parent 6b7dfe37
......@@ -3,12 +3,10 @@
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 username, hostname, current path 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)
TODO:
- display latest return code
- display escalated privileges
- display Ruby version
- display Python version
......@@ -2,7 +2,13 @@
# Some code stolen from oh-my-fish clearance theme: https://github.com/bpinto/oh-my-fish/blob/master/themes/clearance/
function __user_host
echo -n (set_color --bold green)$USER@(hostname|cut -d . -f 1) (set color normal)
set -l content
if [ (id -u) = "0" ];
echo -n (set_color red)
else
echo -n (set_color green)
end
echo -n $USER@(hostname|cut -d . -f 1) (set color normal)
end
function __current_path
......@@ -39,3 +45,11 @@ function fish_prompt
echo -e ''
echo (set_color white)"╰─"(set_color --bold white)"\$ "(set_color normal)
end
function fish_right_prompt
set -l st $status
if [ $st != 0 ];
echo (set_color red) ↵ $st(set_color normal)
end
end
themes/bira/screenshot.png

9.5 KB | W: | H:

themes/bira/screenshot.png

30.1 KB | W: | H:

themes/bira/screenshot.png
themes/bira/screenshot.png
themes/bira/screenshot.png
themes/bira/screenshot.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment