dot

packages and services management
Log | Files | Refs | README

commit 4395395fbf6cdf2082b62bd4eaa1c3306fdc4e50
parent 307cd06b45a2f7a79e65b55f1b446be71bc12fda
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 16 Sep 2018 13:49:57 +0200

Merge branch 'master' of git.josuah.net:dotfiles

Diffstat:
Mdot/bash_profile | 2+-
Mdot/kshrc | 14++++++++------
2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/dot/bash_profile b/dot/bash_profile @@ -1,3 +1,3 @@ . "$HOME/.profile" -PS1='\[\033[1;$(test $? = 0 && echo 32 || echo 31)m\]"\[\033[0;1m\] \t \h\[\033[34m\]\$\[\033[m\] ' +PS1='\[\033[1m\]\h\[\033[$(test $? = 0 && echo 32 || echo 31)m\]\$\[\033[m\] ' diff --git a/dot/kshrc b/dot/kshrc @@ -1,8 +1,10 @@ . "$HOME/.profile" -PS1=$(printf '\033[1;%sm%s \033[37m%s\033[34m%s \033[m' \ - '$(test $? = 0 && echo 32 || echo 31)' \ - '$(date +%T)' \ - '$(uname -n)' \ - "$(test $(whoami) = root && echo '#' || echo '$')" -) +PS1='$( + test $? = 0 && color=32 || color=31 + test "$(whoami)" = root && user=# || user="$" + printf "\\033[1m%s\\033[%sm%s\\033[m " \ + "$(uname -n)" \ + "$color" \ + "$user" +)'