Last active
August 29, 2015 14:03
-
-
Save kstep/00b48e4d2675d05cd565 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_prompt --description 'Write out the prompt' | |
set -l last_status $status | |
set -l prompt_status | |
if test $last_status -ne 0 | |
if not set -q __fish_prompt_status | |
set -g __fish_prompt_status (set_color $fish_color_status) | |
end | |
set prompt_status "$__fish_prompt_status [$last_status]$__fish_prompt_normal" | |
end | |
function prompt_tty --description "Print current terminal name" | |
tty | sed -e 's#/dev/##' | |
end | |
echo -n -s (set_color cyan)" — " (set_color -o green)(prompt_pwd)(set_color normal) (set_color cyan)(__telar_git_prompt) " " (set_color -o magenta)(prompt_tty)"$prompt_status"(set_color normal)": " | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment