Last active
July 3, 2016 00:54
-
-
Save takkumattsu/aac22f912bae2a60170188182cd69cbc to your computer and use it in GitHub Desktop.
Linuxサーバ用の.bashrc
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
# .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