-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmac_bashrc
57 lines (45 loc) · 1.58 KB
/
mac_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
# If not running interactively, don't do anything
# prevents RC from breaking non-interactive commands
# like SCP
case $- in
*i*) ;;
*) return;;
esac
# Colorful fortunes upon login if the shell is interactive
fortune | cowsay -f $(ls /usr/local/Cellar/cowsay/3.04/share/cows | gshuf -n1) | lolcat
# Emacs without GUI
alias emacs='emacs -nw'
# Quickly make a reverse tunnel
alias tunnel=./.scripts/QuickTunnel.sh
# Alias to wrap connecting and creating tmux workspaces
workon() {
tmux new -s $@ || tmux attach -t $@
}
# LS Aliases
alias ls="ls -G"
alias tls="tmux list-sessions"
alias hls="hadoop fs -ls"
# Green
alias llgreen="git fetch --all ; git rebase origin/master --autostash && git submodule update --init"
# Defer initialization of nvm until nvm, node or a node-dependent command is
if [ -s "$HOME/.nvm/nvm.sh" ]; then
export NVM_DIR="$HOME/.nvm"
alias load_nvm='[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" && unalias nvm node npm && . "$NVM_DIR"/nvm.sh'
alias nvm='load_nvm && nvm'
alias node='load_nvm && node'
alias npm='load_nvm && npm'
fi
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
git config --global user.name "Helw150"
git config --global user.email [email protected]
export TERM=xterm-256color
GIT_PROMPT_ONLY_IN_REPO=1
GIT_PROMPT_THEME=Solarized_Ubuntu
eval "$(starship init bash)"