Created
October 17, 2014 09:19
.bashrc (remote)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set colorful prompt | |
# export PS1='\[\e[1;32m\][\u@\h \W]\$\[\e[0m\] ' | |
# export PROMPT_DIRTRIM=2 | |
export MYPS='$(echo -n "${PWD/#$HOME/~}" | awk -F "/" '"'"'{if (length($0) > 20) { if (NF>4) print $1 "/" $2 "/.../" $(NF-1) "/" $NF; else if (NF>3) print $1 "/" $2 "/.../" $NF; else print $1 "/.../" $NF; } else print $0;}'"'"')' | |
case "$TERM" in | |
"dumb") | |
PS1="> " | |
;; | |
xterm*|rxvt*|eterm*|screen*) | |
PS1='\[\e[1;32m\][\u@\h]$(eval "echo ${MYPS}")$\[\e[0m\] ' | |
;; | |
*) | |
PS1="> " | |
;; | |
esac | |
# Allow multi-color terminal (used with lean-mean .vim repo) | |
alias tmux='tmux -2' | |
# export TERM=screen-256color | |
# if [ -n "$DISPLAY" -a "$TERM" == "screen" ]; then | |
if [ "$TERM" == "screen" ]; then | |
export TERM=screen-256color | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment