summaryrefslogtreecommitdiff
path: root/kshrc
diff options
context:
space:
mode:
Diffstat (limited to 'kshrc')
-rw-r--r--kshrc38
1 files changed, 38 insertions, 0 deletions
diff --git a/kshrc b/kshrc
new file mode 100644
index 0000000..cd372c4
--- /dev/null
+++ b/kshrc
@@ -0,0 +1,38 @@
+# zachir's ksh config
+
+[ -f /etc/ksh.kshrc ] && . /etc/ksh.kshrc
+
+[ -f $HOME/.config/sh/aliases ] && . $HOME/.config/sh/aliases
+[ -f $HOME/.config/sh/functions ] && . $HOME/.config/sh/functions
+
+RED="\033[1;31m"
+GRE="\033[1;32m"
+YEL="\033[1;33m"
+BLU="\033[1;34m"
+PUR="\033[1;35m"
+CYA="\033[1;36m"
+CLR="\033[1;0m"
+
+[ -f "$XDG_CONFIG_HOME"/sh/aliases ] && . "$XDG_CONFIG_HOME"/sh/aliases
+[ -f "$XDG_CONFIG_HOME"/sh/functions ] && . "$XDG_CONFIG_HOME"/sh/functions
+
+case "$-" in
+*i*) # we are interactive
+ # we may have su'ed so reset these
+ HOSTNAME=${HOSTNAME:-$(uname -n)}
+ HOST=${HOSTNAME%%.*}
+
+ #PROMPT="$USER:!$PS1S"
+ #PROMPT="<$USER@$HOST:!>$PS1S"
+ case "$USER" in
+ "root") COLOR='\e[1;31m' ;;
+ "git") COLOR='\e[1;32m' ;;
+ "zachir") COLOR='\e[1;36m' ;;
+ esac
+ PROMPT="$COLOR"'[\u@\h]:\e[0m\w'"$COLOR"'\$ \e[0m'
+ PS1=$PROMPT
+
+ set -o vi
+
+;;
+esac