Skip to content

Instantly share code, notes, and snippets.

@takkumattsu
Last active July 3, 2016 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takkumattsu/aac22f912bae2a60170188182cd69cbc to your computer and use it in GitHub Desktop.
Save takkumattsu/aac22f912bae2a60170188182cd69cbc to your computer and use it in GitHub Desktop.
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