# .kshrc is for interactive use. case $- in *i*) ;; *) return 0 2>/dev/null || exit 0 ;; esac PROMPT_TAIL='$' [ "$(id -u)" -eq 0 ] && PROMPT_TAIL='#' __prompt() { p=$PWD if [ "$p" = "$HOME" ]; then printf ' ~ ' elif [ "$p" = / ]; then print ' / ' else dir_b="${p%/*}" # /home/user/projects dir_b="${dir_b##*/}" # projects dir_a="${p##*/}" # myfolder if [ "$dir_b" = "$USER" ]; then dir_b='~' fi result="$dir_b/$dir_a" printf " %s " $result fi br=$(git rev-parse --abbrev-ref HEAD 2>/dev/null) case "$br" in ''|HEAD) ;; *) printf "\033[32m(%s)\033[0m " "$br" ;; esac printf "$PROMPT_TAIL " } PS1='$(__prompt)' export HISTFILE=~/.ksh_history export HISTSIZE=1000000 alias gs="git status" alias gc="git commit" alias ga="git add" alias gd="git diff" alias gds="git diff --staged" alias gp="git push" alias gpo="git push origin" alias gpl="git pull" alias gplrb="git pull --rebase" alias gl="git log" alias gv="git log --graph --decorate --oneline" alias gch="git checkout" alias gcb="git checkout -b" alias h="history 25" alias j="jobs -l" alias l="ls -al" set -o emacs