diff options
author | zachir <zachir@librem.one> | 2022-10-05 22:00:32 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2022-10-05 22:00:32 -0500 |
commit | f39d735e2ba625a31a7dbf6fb8bdd62501379ad1 (patch) | |
tree | d17c96714c930e0b8bc75616cc9c81b961ed5aa0 /kshrc |
Initial Commit
Diffstat (limited to 'kshrc')
-rw-r--r-- | kshrc | 38 |
1 files changed, 38 insertions, 0 deletions
@@ -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 |