dot

packages and services management
Log | Files | Refs | README

commit db08d3a5f4590b1e51f53108fef9ffb3ab314d85
parent 82279b184eecd832d9d7c78c144da2d6e280a8c0
Author: Josuah Demangeon⠠⠵ <mail@josuah.net>
Date:   Tue, 14 Mar 2017 13:41:21 +0100

Text-only prompt

Diffstat:
M.profile | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/.profile b/.profile @@ -33,15 +33,14 @@ export FILTER='iomenu' PS1='$( - [ "$?" -gt 0 ] && color="1" || if git rev-parse 2>/dev/null - then [ "$(git status -s)" ] && color="3" || color="2" - fi + [ "$?" -gt 0 ] && error="X" + git rev-parse 2>/dev/null && git="$(git status -s | wc -l)" - [ "$SSH_CONNECTION" ] && host=" $(hostname)" + [ "$SSH_CONNECTION" ] && host="$(hostname)" printf "\033[?6c" - printf "\033]0;%s\007" "$(git-pwd)" # terminal name - printf "\n%s \033[1;3%dm•\033[m%s " "$host" "${color:-7}" + printf "\033]0;%s\007" "$(git-pwd)" # terminal name + printf "\n%s%1s%1s• " "$host" "$git" "$error" )' PS2=': ' PS3=': '