Skip to content

Instantly share code, notes, and snippets.

@TakkuMattsu TakkuMattsu/.bashrc
Last active Jul 3, 2016

Embed
What would you like to do?
Linuxサーバ用の.bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
# PS1
IP_ADDR=$(ip -f inet a show eth0 | grep inet | cut -d' ' -f 6 | cut -d'/' -f 1)
source /usr/share/git-core/contrib/completion/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=true
export PS1='\[\033[37m\][\[\033[36m\]\u\[\033[37m\]@\[\033[35m\]$IP_ADDR\[\033[33m\](\h) \[\033[32m\]\W\[\033[37m\]]\[\033[31m\]$(__git_ps1)\[\033[00m\]\\$ '
# for root
#export PS1='\[\033[37m\][\[\033[47m\]\[\033[31m\]\u\[\033[0m\]\[\033[37m\]@\[\033[35m\]$IP_ADDR \[\033[32m\]\W\[\033[37m\]]\[\033[31m\]$(__git_ps1)\[\033[31m\]\$\[\033[00m\] '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.