This file contains 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_right_prompt | |
set -l delay | |
set -l now (date +%s) | |
if set -q __fish_last_prompt | |
set -g dur (math $now - $__fish_last_prompt) | |
if test $dur -lt 120 | |
set delay (printf '%ds' $dur) | |
else if test $dur -lt 3600 | |
set delay (printf '%d:%02d' (math "floor($dur / 60)") (math "$dur % 60")) | |
else |
This file contains 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 | |
set sepcol (set_color -o blue) | |
set hstcol (set_color -o yellow) | |
set pthcol (set_color cyan) | |
set gitcol (set_color normal) | |
if test $USER = "root" | |
set usrcol (set_color red) | |
else | |
set usrcol (set_color -o green) | |
end |