-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
118 lines (89 loc) · 3.52 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/usr/bin/env bash
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PS1='[\u@\h \W]\n$ '
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=200000
# Command history
export HISTCONTROL=ignoredups # (ignoreboth -> ignoredups and ignorespace)
HISTIGNORE='?:??:rm *:\\rm *:r \\m *'
# append to the history file, don't overwrite it
shopt -s histappend
# shellcheck source=.aliases
source ~/.aliases
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
if test -d "$HOME"/.local/bin; then
PATH=$PATH:"$HOME"/.local/bin
fi
if [ -f /usr/share/git-core/git-completion.bash ]; then
# shellcheck disable=SC1091
source /usr/share/git-core/git-completion.bash
fi
if [ -d "$HOME"/.composer/vendor/bin ]; then
export PATH="$HOME"/.composer/vendor/bin:${PATH}
fi
# for rbenv
export PATH=~/.rbenv/bin:$PATH
eval "$(rbenv init -)"
# for pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
export CARGO_HOME="$XDG_DATA_HOME"/cargo
export GEM_HOME="$XDG_DATA_HOME"/gem
export GEM_SPEC_CACHE="$XDG_CACHE_HOME"/gem
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
export IRBRC="$XDG_CONFIG_HOME"/irb/irbrc
export HISTFILE="$XDG_DATA_HOME"/bash/history
export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
export NVM_DIR="$XDG_DATA_HOME"/nvm
# export STACK_ROOT="$XDG_DATA_HOME"/stack
export VAGRANT_ALIAS_FILE="$XDG_DATA_HOME"/vagrant/aliases
export VAGRANT_HOME="$XDG_DATA_HOME"/vagrant
export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
export MACHINE_STORAGE_PATH="$XDG_DATA_HOME"/docker-machine
export MYSQL_HISTFILE="$XDG_DATA_HOME"/mysql_history
export PSQLRC="$XDG_CONFIG_HOME/pg/psqlrc"
export PSQL_HISTORY="$XDG_CACHE_HOME/pg/psql_history"
export PGPASSFILE="$XDG_CONFIG_HOME/pg/pgpass"
export PGSERVICEFILE="$XDG_CONFIG_HOME/pg/pg_service.conf"
export SQLITE_HISTORY="$XDG_DATA_HOME"/sqlite_history
export OCTAVE_HISTFILE="$XDG_CACHE_HOME/octave-hsts"
export OCTAVE_SITE_INITFILE="$XDG_CONFIG_HOME/octave/octaverc"
export BASH_COMPLETION_USER_FILE="$XDG_CONFIG_HOME"/bash-completion/bash_completion
export AWS_SHARED_CREDENTIALS_FILE="$XDG_CONFIG_HOME"/aws/credentials
export AWS_CONFIG_FILE="$XDG_CONFIG_HOME"/aws/config
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
if hash gpg2 2>/dev/null; then
gpg2 --homedir "$XDG_DATA_HOME"/gnupg
fi
mkdir -p "$XDG_CACHE_HOME"/less
export LESSKEY="$XDG_CONFIG_HOME"/less/lesskey
export LESSHISTFILE="$XDG_CACHE_HOME"/less/lesshst
export GRADLE_USER_HOME=/Users/pogin/.local/share/gradle
export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
# export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
# export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc
export OCTAVE_HISTFILE="$XDG_CACHE_HOME/octave-hsts"
export OCTAVE_SITE_INITFILE="$XDG_CONFIG_HOME/octave/octaverc"
export PYTHON_EGG_CACHE="$XDG_CACHE_HOME"/python-eggs
export PYLINTHOME="$XDG_CACHE_HOME"/pylint
export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
export PATH="/Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin:$PATH"
if [[ $(uname) = 'Darwin' ]]; then
export GROOVY_HOME=/usr/local/opt/groovy/libexec
if [ -f "$(brew --prefix)"/etc/bash_completion ]; then
. "$(brew --prefix)"/etc/bash_completion
fi
fi
# WebAssembly
export WASMER_DIR="$HOME/.wasmer"
[ -s "$WASMER_DIR/wasmer.sh" ] && source "$WASMER_DIR/wasmer.sh"