dot

packages and services management
Log | Files | Refs | README

commit 14a15485d988fec75f4ba9e9840851ce4fc80b2b
parent f11ab5a9d2872932a28a70a0112e30441f0426bc
Author: Josuah Demangeon⠠⠵ <mail@josuah.net>
Date:   Sat, 18 Mar 2017 14:30:17 +0100

saner prompt escape sequences (none in last line)

Diffstat:
M.profile | 16++++++++--------
Mbin/git-status | 2+-
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/.profile b/.profile @@ -33,25 +33,25 @@ export FILTER='iomenu' PS1='$( - [ "$?" -gt 0 ] && error="1;31" || error="" + error="$?" [ -z "${PWD##$HOME*}" ] && pwd="~${PWD#$HOME}" || pwd="$PWD" - [ "$SSH_CONNECTION" ] && host="$(hostname)" printf "\033[?6c" printf "\033]0;%s\007" "$pwd" - printf "\n" - printf "\033[1;30m%s\033[m %s\n" "$pwd" "$(git-status)" - printf "%s\033[%sm\$\033[m " "$host" "$error" + + printf "\n\033[0;1;30m%s\033[m%s" "$pwd" "$(git-status)" + [ "$SSH_CONNECTION" ] && printf " %s" "$(hostname)" + [ "$error" -gt 0 ] && printf " \033[1;31m%s\033[m" "$error" + printf "\n\$ " )' PS2=': ' PS3=': ' # core -alias p='git-pwd' -alias l='ls -lhp' -alias la='ls -lhpA' +alias l='ls -lhF' +alias la='ls -lhFA' alias cl='printf "\033[H\033[2J"' alias ..='cd ..' alias j='jobs' diff --git a/bin/git-status b/bin/git-status @@ -30,7 +30,7 @@ git rev-parse 2> /dev/null && git status --porcelain -b | awk ' /^[^ ]. / { staged++; } END { - printf("%s\033[m", branch); + printf(" %s\033[m", branch); if (untracked + conflicts + changed + staged + behind + ahead == 0) { printf " \033[1;32m✓\033[m";