Created
July 11, 2017 08:07
-
-
Save bubbobne/05b12303b71441c25d41a2a3310d63c7 to your computer and use it in GitHub Desktop.
bash color e alias
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
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)" | |
# | |
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then | |
debian_chroot=$(cat /etc/debian_chroot) | |
fi | |
# | |
case "$TERM" in | |
xterm-color) | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
;; | |
*) | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;36m\][\t]\[\033[00m\]\[\033[01;32m\]\u@:\[\033[00m\]\[\033[01;34m\]\w\[\033[00m\]\[\033[01;31m\][\!] \$ \[\033[00m\]\[\033[01;35m\]' | |
;; | |
esac | |
case "$TERM" in | |
xterm*|rxvt*)\ | |
PROMPT_COMMAND='echo -ne "\033]0; ${PWD/$HOME/~}\007"' | |
;; | |
*) | |
;; | |
esac | |
# enable color support of ls and also add handy aliases | |
if [ "$TERM" != "dumb" ]; then | |
eval "`dircolors -b`" | |
alias ls='ls --color=auto' | |
#alias dir='ls --color=auto --format=vertical' | |
#alias vdir='ls --color=auto --format=long' | |
fi | |
# some more ls aliases | |
alias ll='ls -lh' | |
alias la='ls -A' | |
alias l='ls -CF' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment