dotfiles

configuration files
git clone https://pi.duncano.de/git/dotfiles.git
Log | Files | Refs | README

commit 52bbcf8b0739dce2b225d96378d791fb9fb86b5b
parent 6be6e04f53e44d979a68ddeecb1748ce6ba1103e
Author: Duncaen <mail@duncano.de>
Date:   Wed, 14 Jun 2017 00:15:52 +0200

add: kshrc

Diffstat:
install.sh | 6++++++
kshrc | 21+++++++++++++++++++++
2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/install.sh b/install.sh @@ -40,6 +40,11 @@ _mksh() { msg "INSTALL" "mksh config" _ln_home "mkshrc" ".mkshrc" } +_ksh() { + [ -n "$(command -v ksh 2>/dev/null)" ] || return + msg "INSTALL" "ksh config" + _ln_home "kshrc" ".kshrc" +} _yash() { [ -n "$(command -v yash 2>/dev/null)" ] || return msg "INSTALL" "yash config" @@ -90,6 +95,7 @@ _gtk() { : ${HOME:=~} _mksh +_ksh _yash _shell _bin diff --git a/kshrc b/kshrc @@ -0,0 +1,21 @@ +[ -r /etc/ksh.kshrc ] && . /etc/ksh.kshrc + +[ -z "$SSH_AUTH_SOCK" ] && [ -r ~/.cache/ssh-agent-info ] && \ + . ~/.cache/ssh-agent-info + +[ -r ~/.aliases ] && . ~/.aliases + +case "$TERM" in +network|dump) + PS1=$'\001\r''$(\ +((r=$?)) && e="?$r" || e=;\ +d=${PWD/$HOME/\~}; d=${d##*/};\ +[ "$SSH_CONNECTION" ] && s="@${HOSTNAME:=$(hostname)}" || s=;\ +((USER_ID)) && i=\$ || i=\#;\ +print "$d$s$e$i ")' +;; +xterm|*-256color) + alias weechat='print "\033]0;weechat\a$d$s$e$i " && weechat' + PS1=$'\001\r\W'$([ "$SSH_CONNECTION" ] && print '@\h')'$(((e=$?)) && print "?\e[0;31;40m$e\e[0m")\$ ' +;; +esac