Grouping stuff

This commit is contained in:
2017-10-15 20:50:00 +02:00
parent b90cf92fb5
commit 832fa5ee30
30 changed files with 120 additions and 37 deletions

View File

@@ -0,0 +1,29 @@
function fish_prompt
set -l status_copy $status
if set -q VIRTUAL_ENV
echo -sn "(" (basename "$VIRTUAL_ENV") ")"
end
# Hostname with unique color
set_color (hostname -s | md5 | cut -c-6)
echo -sn (hostname -s)
# A yellow separator
# The color of this could be used to signify something
set_color yellow
echo -sn ':'
# Contracted path to PWD
set_color normal
echo -sn (prompt_pwd)
# A green or red >, depending on exit status of last command
if test "$status_copy" -ne 0
set_color red
else
set_color green
end
echo -sn ' > '
end