Initial checkin

This commit is contained in:
2015-08-21 02:14:05 -07:00
commit d7ebb8e0d2
15 changed files with 395 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
# prints "ARG1:ARG2" with appropriate colors
function section
printf ", "
printf $c1
printf $argv[1]
printf $c0
printf ":"
printf $c3
printf $argv[2]
printf $c0
end
function machine_tag
hostname | cut -f1 -d. - | tr '[a-z]' '[A-Z]'
end
function fish_right_prompt
# Current time
printf $c0
printf "["
printf (date "+$c2%H$c0:$c2%M")
# Show last execution time
if test $CMD_DURATION
if test $CMD_DURATION -gt (math "1000 * 2")
set secs (math "$CMD_DURATION / 1000")
section took {$secs}s
end
end
printf $c0
printf "]"
if set -q SSH_CLIENT
printf "["
printf $c1
printf (machine_tag)
printf $c0
printf "]"
end
end