-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_bashrc
87 lines (69 loc) · 2.32 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
export EDITOR=vim
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# 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
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# Git bash completion
if [ -f /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash ]; then
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash
fi
# Git repo branch prompt
if [ -f /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh ]; then
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh
fi
if [ -f /etc/bash_completion.d/git-prompt ]; then
source /etc/bash_completion.d/git-prompt
fi
GIT_PS1_SHOWUPSTREAM="auto"
GIT_PS1_SHOWCOLORHINTS="yes"
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWUNTRACKEDFILES=true
export PROMPT_COMMAND='__git_ps1 "\u:\W" "\\\$ " " [%s] "; echo -ne "\033]0;${PWD##*/}\007"'
# NVM
if [ -f ~/.nvm/nvm.sh ]; then
. ~/.nvm/nvm.sh
fi
# General Aliases
alias sl='ls'
alias ll='ls -AlhF'
alias la='ls -A'
alias l='ls -CF'
alias ..='cd ../..'
alias ...='cd ../../..'
alias ....='cd ../../../..'
alias .....='cd ../../../../..'
alias .5='cd ../../../../..'
alias ......='cd ../../../../../..'
alias .6='cd ../../../../../..'
# Git Aliases
alias g='git'
alias gti='git'
alias gcim='git commit -m'
alias gciam='git commit -a -m'
# Docker aliases
alias d="docker"
alias di="docker images"
alias dc="docker-compose"
alias dm="docker-machine"
alias dv="docker volume"
alias dcl="docker exec -it `docker ps -l -q` /bin/bash"
alias dll="docker logs `docker ps -l -q`"
alias dsl="docker stop `docker ps -l -q`"
alias dsa="docker stop `docker ps -q`"
alias dkl="docker stop \`docker ps -q\`"
alias dka="docker kill $(docker ps -q)"
alias drmall="docker rm $(docker ps -a -q)"
alias drmiall="docker rmi $(docker images -a -q)"
alias drminone="docker rmi $(docker images -f 'dangling=true' -q)"
# Node
alias ni="npm install"
alias lsn='ps -ef | grep node | grep -v grep'
alias np='netstat -tln | grep node'
alias ntop='top -c -p $(pgrep -d',' -f node)'