aboutsummaryrefslogtreecommitdiff
path: root/kshrc
diff options
context:
space:
mode:
Diffstat (limited to 'kshrc')
-rw-r--r--kshrc21
1 files changed, 21 insertions, 0 deletions
diff --git a/kshrc b/kshrc
new file mode 100644
index 0000000..5b98892
--- /dev/null
+++ 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