-
Notifications
You must be signed in to change notification settings - Fork 1
/
bashrc
executable file
·53 lines (47 loc) · 1.29 KB
/
bashrc
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
C_GREEN="\[\e[32m\]"
C_BLUE="\[\e[34m\]"
C_RESET="\[\e[0m\]"
# alias
alias cd='pushd > /dev/null'
alias cdh='cd ~'
alias ch='cd ~'
alias d='dirs -v'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias ls='ls -CFGx'
alias l='ls -lG'
alias ll='ls -lhaG'
alias la='ls -alG'
alias vim='nvim'
alias vimdiff='nvim -d'
alias diff='colordiff'
alias dk='docker'
# brew "bash-completion"
BASH_COMPLETION_PATH=/usr/local/etc/profile.d/bash_completion.sh
if [ -r ${BASH_COMPLETION_PATH} ]; then
# shellcheck disable=SC1090
. ${BASH_COMPLETION_PATH}
fi
# prompt
# brew "git"
GIT_PROMPT_PATH=/usr/local/etc/bash_completion.d/git-prompt.sh
GIT_COMPLETION_PATH=/usr/local/etc/bash_completion.d/git-completion.bash
if [ -r ${GIT_PROMPT_PATH} ] && [ -r ${GIT_COMPLETION_PATH} ]; then
# shellcheck disable=SC1090
source ${GIT_PROMPT_PATH}
# shellcheck disable=SC1090
source ${GIT_COMPLETION_PATH}
# shellcheck disable=SC2034
GIT_PS1_SHOWDIRTYSTATE=true
PS1="${C_BLUE}[\w]${C_RESET} ${C_GREEN}\$(__git_ps1)${C_RESET}\n$ "
else
PS1="${C_BLUE}[\w]${C_RESET}\n$ "
fi
# 端末ロック無効化
if [[ -t 0 ]]; then
stty stop undef
stty start undef
fi
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
export PATH=$PATH:/Users/rtakasuke/.nodebrew/current/bin