diff options
| author | tslil clingman <> | 2019-09-11 19:18:14 -0400 |
|---|---|---|
| committer | tslil clingman <> | 2019-09-11 19:18:14 -0400 |
| commit | ac1a4884d03fc0495c773500d8a13f84b695fa43 (patch) | |
| tree | 29e5ec49e0ce957d80d8f11a155b47840c74f488 /fish/functions/fish_prompt.fish | |
Init
Diffstat (limited to 'fish/functions/fish_prompt.fish')
| -rw-r--r-- | fish/functions/fish_prompt.fish | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..8037fc4 --- /dev/null +++ b/fish/functions/fish_prompt.fish @@ -0,0 +1,32 @@ +function fish_prompt + set -l fail $status + tput bold + echo -ne "[" + set_color magenta + echo -ne (pwd) | sed 's#.*/\(.*\)/\(.*\)#\1/\2#' + #echo -ne (pwd) | sed 's#.*/\(.*\)#\1#' + set_color normal + tput bold + echo -ne "](" + set_color -o cyan + echo -ne (date "+%y.%m.%d %Hh%M") + set_color normal + tput bold + echo -ne ")" + set_color normal + + vcs_string + + if [ $fail = 0 ]; + set_color -o green; + else + set_color -o red; + end; + + if test (id -u) -eq 0; + echo -ne "\# " + else + echo -ne "\$ " + end + set_color normal +end |
