-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_profile.bash
More file actions
146 lines (110 loc) · 3.2 KB
/
bash_profile.bash
File metadata and controls
146 lines (110 loc) · 3.2 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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# Inspired by:
# http://welinux.ru/post/7293/
# https://github.com/cowboy/dotfiles/
# https://github.com/miripiruni/dotfiles
# https://github.com/dreadatour/dotfiles
# Global Variables #
####################
# npm
if [ -d ~/.npm-global ]; then
export PATH=~/.npm-global/bin:$PATH
export NODE_PATH=$NODE_PATH:~/.npm-global/lib/node_modules
fi
#basher
if [ -d ~/.basher ]; then
export PATH=~/.basher/bin:$PATH
eval "$(basher init - bash)"
fi
if [ -d ~/.cargo ]; then
export PATH="$HOME/.cargo/bin:$PATH"
fi
if [ -d ~/go ]; then
export GOPATH=$HOME/go
export PATH="$PATH:$GOPATH/bin"
fi
# JetBrains Toolbox App
if [ -d ~/.local/share/JetBrains/Toolbox/scripts ]; then
export PATH="$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts"
fi
# bash prompt
if [ -f ~/.bash_functions ]; then
. ~/.bash_functions
fi
# bash aliases
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# tmuxinator
if [ -f ~/.bash-completion/tmuxinator.bash ]; then
source ~/.bash-completion/tmuxinator.bash
fi
# Alacritty
if [ -f ~/.bash-completion/alacritty.bash ]; then
source ~/.bash-completion/alacritty.bash
fi
# https://github.com/wting/autojump
if [ -f /usr/share/autojump/autojump.sh ]; then
. /usr/share/autojump/autojump.sh
fi
# SDKMAN!
# https://sdkman.io/
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
# nvm (Node Version Manager)
# https://github.com/nvm-sh/nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && source "$NVM_DIR/bash_completion"
# npm
if [ -f ~/.bash-completion/npm.bash ]; then
source ~/.bash-completion/npm.bash
fi
# pm2
if [ -f ~/.bash-completion/pm2.bash ]; then
source ~/.bash-completion/pm2.bash
fi
# Base16 Shell
BASE16_SHELL="$HOME/.config/base16-shell/"
[ -n "$PS1" ] && [ -s "$BASE16_SHELL/profile_helper.sh" ] && source "$BASE16_SHELL/profile_helper.sh"
# Path #
########
# Set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
# bash prompt
if [ -f ~/.bash_prompt ]; then
. ~/.bash_prompt
fi
# color in different utilitties by default
alias ls='ls --color=auto'
alias grep='grep --color=auto'
eval `dircolors -b`
# color in man
export LESS_TERMCAP_mb=$'\033[01;36m'
export LESS_TERMCAP_md=$'\033[01;32m'
export LESS_TERMCAP_me=$'\033[0m'
export LESS_TERMCAP_mu=$'\033[01;37m'
export LESS_TERMCAP_se=$'\033[0m'
export LESS_TERMCAP_so=$'\033[01;44;33m'
export LESS_TERMCAP_ue=$'\033[0m'
export LESS_TERMCAP_us=$'\033[01;36m'
# Variable to use colorful MC and VIM
# Deprecated: Used from `Xresources`
# export TERM=xterm-256color
export EDITOR=/usr/bin/vim
# big history
export HISTFILESIZE=20000
export HISTSIZE=20000
# append to the history file, don't overwrite it
shopt -s histappend
# Combine multiline commands into one in history
shopt -s cmdhist
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# Avoid duplicates
export HISTCONTROL=ignoredups:erasedups
export HISTIGNORE="&:ls:[bf]g:exit"
# Load extra (private) settings
[ -f ~/.bashlocal ] && source ~/.bashlocal