-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
84 lines (65 loc) · 2.01 KB
/
.zshrc
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
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
. $HOME/.asdf/asdf.sh
. ~/.asdf/plugins/java/set-java-home.zsh
# Customize to your needs...
#
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# GO ----------------------------
# export PATH="$PATH:/usr/local/go/bin"
# export GOHOME="$HOME/go"
alias k='kubectl'
# Haskell Stack
export PATH="$PATH:/Users/andre/.local/bin"
# Flutter
export PATH="$PATH:$HOME/.pub-cache/bin"
# GIT ----------------------------
alias gst='git status'
alias ggp='git push origin HEAD:refs/for/master'
alias gm='git commit -m '
alias gca='git commit --amend'
alias gco='git checkout'
alias gbl='git branch --sort=-committerdate'
# Outputs the name of the current branch
# Usage example: git pull origin $(git_current_branch)
# Using '--quiet' with 'symbolic-ref' will not cause a fatal error (128) if
# it's not a symbolic ref, but in a Git repo.
function current_branch() {
local ref
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null)
local ret=$?
if [[ $ret != 0 ]]; then
[[ $ret == 128 ]] && return # no git repo.
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
fi
echo ${ref#refs/heads/}
}
# Default git push to current branch
function gpoc {
echo Pushing $(current_branch)
git push origin $(current_branch)
}
function gfpoc {
echo FORCE Pushing $(current_branch)
git push -f --set-upstream origin $(current_branch)
}
# Default git pull from current branch
function gploc {
echo Pulling $(current_branch)
git pull origin $(current_branch)
}
alias gbsm='git branch --merged | egrep -v "(^\*|master|dev)"'
alias gbdm='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d'
[[ -s "/Users/andre/.gvm/scripts/gvm" ]] && source "/Users/andre/.gvm/scripts/gvm"
export PATH="/usr/local/opt/libpcap/bin:$PATH"
alias dc=docker-compose
unalias rm