oh-my-fish/themes/idan/fish_right_prompt.fish
Idan Gazit d66cae317f Adding "idan" theme
A functional, uncluttered theme. Boasts the following features:

Left Prompt:
* Current virtualenv (if applicable)
* Truncated CWD (just the current folder's name)
* Git branch and dirty state (if applicable)

Right Prompt:
* Full CWD path
* Last error code (if applicable)
2013-05-21 17:57:24 -03:00

18 lines
435 B
Fish

# Display the compressed current working path on the right
# If the previous command returned any kind of error code, display that too
function fish_right_prompt
set -l last_status $status
set -l cyan (set_color -o cyan)
set -l red (set_color -o red)
set -l normal (set_color normal)
echo -n -s $cyan (prompt_pwd)
if test $last_status -ne 0
set_color red
printf ' %d' $last_status
set_color normal
end
end