dot

packages and services management
Log | Files | Refs | README

commit 5414db584de27f0e4bbc1085ba8eae05170573d4
parent 8745ecc72d27949da91e8256ad9265a0445a8c16
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Sat,  5 Aug 2017 00:16:01 +0200

shell/profile, git/bin/git-status: new prompt

Diffstat:
Mgit/bin/git-status | 4+++-
Mshell/profile | 10++++++----
2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/git/bin/git-status b/git/bin/git-status @@ -1,4 +1,4 @@ -git rev-parse 2> /dev/null || exit +git rev-parse 2> /dev/null || exit 1 git status --porcelain -b | awk ' @@ -43,3 +43,5 @@ END { }' [ -d "$(git rev-parse --git-dir)/rebase-merge" ] && printf ' rebase' + +printf '\n' diff --git a/shell/profile b/shell/profile @@ -1,8 +1,10 @@ -PS1='$([ $? = 0 ] || printf " \033[31;1mx\033[m\n ") -$(hostname) $(pwd) $(type git-status > /dev/null 2>&1 && git-status) +PS1='$([ $? = 0 ] || printf "\033[31m\"\"\"\033[m\n")$( + [ "$SSH_CLIENT" ] && hostname + git rev-parse 2> /dev/null && echo && git-status +) ::: ' -PS2='... ' -PS3='... ' +PS2=': ' +PS3=': ' alias cl='printf "\033[H\033[2J"'