Skip to content

Instantly share code, notes, and snippets.

@FumiyaShibusawa
Last active August 31, 2019 10:26
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 FumiyaShibusawa/0b8466c2bb863f9b72d3ee32145e7c57 to your computer and use it in GitHub Desktop.
Save FumiyaShibusawa/0b8466c2bb863f9b72d3ee32145e7c57 to your computer and use it in GitHub Desktop.
my bashrc config
# スクリプト読み込み
source $HOME/.git-completion.bash
source $HOME/.git-prompt.sh
function dc() { docker-compose exec -e COLUMNS=$COLUMNS -e LINES=$LINES -e TERM=$TERM $@ bash; }
# プロンプトに各種情報を表示
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWUPSTREAM=1
GIT_PS1_SHOWUNTRACKEDFILES=
GIT_PS1_SHOWSTASHSTATE=1
############### ターミナルのコマンド受付状態の表示変更
# \u ユーザ名
# \h ホスト名
# \W カレントディレクトリ
# \w カレントディレクトリのパス
# \n 改行
# \d 日付
# \[ 表示させない文字列の開始
# \] 表示させない文字列の終了
# \$ $
export PS1='\[\033[1;32m\]\u\[\033[00m\]:\[\033[1;34m\]\w\[\033[1;31m\]$(__git_ps1)\[\033[00m\] \$ '
# もしくは以下
# export PS1='\[\033[40;1;32m\]\u\[\033[2;32m\]@\[\033[0m\]\[\033[40;32m\]\h \[\033[1;36m\]\w \[\033[31m\]$(__git_ps1 "[%s]")\[\033[00m\] \[\033[0m\]\[\033[40;2;37m\]\[\033[0m\]\n\\$ '
##############
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment