bash/.bashrc.d/90-aliases.bash (view raw)
1alias vime="vim ~/.vimrc"
2alias o="xdg-open"
3alias gc="git commit -v -S"
4alias gst="git status --short"
5alias ga="git add"
6alias gd="git diff --minimal"
7alias gl="git log --oneline --decorate --graph"
8alias vim="nvim"
9alias k="kubectl"
10
11nvmon() {
12 source ~/.nvm/nvm.sh
13}
14
15envac() {
16 source .env/bin/activate
17}
18
19vpn() {
20 ~/bin/vpnon.sh
21}
22
23dt() {
24 time.sh -n
25}
26
27ggp() {
28 [[ "$1" == "-f" ]] && {
29 git push "$(git remote show)" -f "$(git branch --show-current)"
30 }
31 git push "$(git remote show)" "$(git branch --show-current)"
32}
33
34gpl() {
35 git pull -r "$(git remote show)" "$(git branch --show-current)"
36}
37
38gpm() {
39 git pull -r origin master
40}
41
42gco() {
43 [[ "$1" == "" ]] && return 1
44
45 git rev-parse --verify "$1" &> /dev/null
46 if [ $? -eq 0 ]; then
47 git checkout "$1"
48 else
49 git checkout -b "$1"
50 fi
51}
52
53ls() {
54 case "$OSTYPE" in
55 "darwin"*)
56 /bin/ls -G "$@"
57 ;;
58 *"bsd"*)
59 colorls -G "$@"
60 ;;
61 esac
62}
63
64m() {
65 case "$OSTYPE" in
66 "darwin"*)
67 s-nail "$@"
68 ;;
69 *"bsd"*)
70 nail "$@"
71 ;;
72 esac
73}