forked from harajune/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_bashrc
More file actions
81 lines (70 loc) · 1.97 KB
/
_bashrc
File metadata and controls
81 lines (70 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# .bashrc
# Source global definitions
if [[ -f /etc/bashrc ]]; then
. /etc/bashrc
fi
# Source original definitions
if [[ -f /etc/skel/.bashrc ]] ; then
. /etc/skel/.bashrc
fi
# User specific aliases and functions
# エリアス設定
if [[ -f ~/.bash_aliases ]] ; then
. ~/.bash_aliases
fi
# プロンプト設定
if [[ -d "$TOOLBOX_DIR" ]]; then
if [[ -s "$TOOLBOX_DIR/completion" ]]; then
for COMPLETION_FILE in $(ls $TOOLBOX_DIR/completion/*.bash)
do
. $COMPLETION_FILE
done
fi
[[ -s "$TOOLBOX_DIR/share/git-core/contrib/completion/git-completion.bash" ]] && \
. "$TOOLBOX_DIR/share/git-core/contrib/completion/git-completion.bash"
[[ -s "$TOOLBOX_DIR/share/git-core/contrib/completion/git-prompt.sh" ]] && \
. "$TOOLBOX_DIR/share/git-core/contrib/completion/git-prompt.sh"
PG_="\[\e[4;31m\]\$(__git_ps1)"
GIT_PS1_SHOWDIRTYSTATE=true
fi
case "$TERM" in
linux)
export LC_MESSAGES=C
PB_="\[\e[0;35m\]=> \$?\n"
P1_="\[\e[32m\]\$(date +'%F %T %z') "
P2_="\[\e[33m\]\u@\h "
P3_="\[\e[36m\]\w"
PE_="\[\e[0m\]\n\\\$ "
export PS1=$PB_$P1_$P2_$P3_$PE_
;;
*)
export LANG=ja_JP.UTF-8
export TERM='screen-256color'
export DISPLAY=localhost:0.0
PB_="\[\e[0;35m\]=> \$?\n"
P1_="\[\e[4;32m\]\$(date +'%F %T %z') "
P2_="\[\e[33m\]\u@\h "
P3_="\[\e[36m\]\w"
PE_="\[\e[0m\]\n\\\$ "
export PS1=$PB_$P1_$P2_$P3_$PG_$PE_
;;
esac
# Enable .envrc file in directory
if [[ -e "$(which direnv 2> /dev/null)" ]]; then
eval "$(direnv hook bash)"
fi
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ]] &&
. "$SDKMAN_DIR/bin/sdkman-init.sh"
# This loads nvm
export NVM_DIR="$HOME/.nvm"
[[ -s "$NVM_DIR/nvm.sh" ]] &&
. "$NVM_DIR/nvm.sh"
[[ -s "$NVM_DIR/bash_completion" ]] &&
. "$NVM_DIR/bash_completion"
# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] &&
. "$HOME/.rvm/scripts/rvm"
:
# vim: set ft=sh ts=2 sw=2 et: