-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_profile
66 lines (60 loc) · 1.55 KB
/
.bash_profile
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
HOST_NAME=sudipto
print_before_the_prompt () {
dir=$PWD
home=$HOME
dir=${dir/"$HOME"/"~"}
printf "\n\e[48;5;237m%s:\e[0m \e[38;5;203m%s\e[0m \e[38;5;214m%s\e[0m\n" "$HOST_NAME" "$dir" "$(vcprompt)"
}
PROMPT_COMMAND=print_before_the_prompt
PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
PS1="> "
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
shopt -s autocd
shopt -s histappend
export PATH=$PATH:$HOME/bin
# aliases
alias bashvim="vim ~/.bash_profile"
alias bashopen="open ~/.bash_profile"
alias bashdot=". ~/.bash_profile"
alias cd.="cd .."
alias cd-="cd -"
alias gi="git init"
alias gl="git log"
alias gs="git status"
alias ga="git add ."
alias gaa="git add -A"
alias gpus="git push"
alias gpul="git pull"
alias vivdev="open /Applications/Vivaldi.app --args --debug-packed-apps --silent-debugger-extension-api"
# git commit alias
function gc() {
git commit -m "$*"
}
# alias for git add and commit
function gac() {
git add . && git commit -m "$*"
}
# git tag aliases
function gt() {
git tag -a "$1" -m "$2"
}
function gtlw() {
git tag "$*"
}
# alias to clone git repo
function gitc() {
git clone "$*"
}
# alias to clone gists locally and cd into it
function gisc() {
git clone git@gist.github.com:"$*".git && cd "$*"
}
# alias to make directory and cd into it
function mkcd()
{
mkdir "$1" && cd "$1"
}
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion