dot

packages and services management
Log | Files | Refs | README

commit c877bb8bd1e4c980afcc55554a0be855e318c088
parent c91061a042ec98ba698c3002bbc8f61eb8f777e6
Author: Josuah Demangeon <mail@josuah.net>
Date:   Mon, 23 Apr 2018 02:56:31 +0200

support dumb term in prompt

Diffstat:
Mconfigure | 7+++----
Mprofile | 12++++++------
2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/configure b/configure @@ -1,10 +1,7 @@ -#!/bin/sh -e +#!/bin/sh -ex cd "${0%/*}" -. ./profile -set -x - mkdir -p "$HOME/run" mkdir -p "$HOME/.config/enchive" @@ -27,6 +24,8 @@ ln -fs "$PWD/git" "$HOME/.config/git" ! git clone git://josuah.net/bin.git "$HOME/bin" ! git clone git://github.com/9fans/plan9port.git "$HOME/plan9" +set +x +. ./profile mkdir -p "$PACKROOT/src" ! git clone git://josuah.net/pack.git "$PACKROOT/src/pack" cd "$PACKROOT/src/pack" diff --git a/profile b/profile @@ -52,11 +52,11 @@ export AGENDA=$HOME/conf/agenda export SSH_AUTH_SOCK=/tmp/ssh-agent -export TERM=screen - export SVDIR=$HOME/run -export PS1='$([ $? -gt 0 ] && printf "\\033[31;1mx\\033[m\\n\\r")'$( - [ $(whoami) = root ] && s='#' || s='$' - printf '\033]0;%s\a\n%s%s ' '$PWD/' $(uname -n) $s -) +export PS1=" +$([ "$(whoami)" = root ] && s='#' || s='$'; printf '%s%s ' "$(uname -n)" "$s")" + +[ "$TERM" = dumb ] || export PS1=$(printf '\033]0;%s\a' '$PWD/')'$( + [ $? -gt 0 ] && printf "\\033[31;1mx\\033[m" +)'$PS1