-
Notifications
You must be signed in to change notification settings - Fork 0
/
my_zsh
76 lines (59 loc) · 2.24 KB
/
my_zsh
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
#!/usr/bin/env bash
export SCRIPTS_DIR="$( cd "$( dirname "$0" )" && pwd )"
# Set my editor and git editor
export EDITOR="nvim"
export GIT_EDITOR='nvim'
# Use VI key bindings
# Use again when I figure out whey the git prompt makes the cursor funny
bindkey -v
# bind 'set show-mode-in-prompt on'
# Don't check mail when opening terminal.
unset MAILCHECK
# Edit common files
alias econfig="nvim ~"
alias ehosts="nvim /etc/hosts"
alias lconfig='rm -f ~/.config/nvim && rm -f ~/.tmux.conf && ln -s ~/code/dotfiles/nvim/ ~/.config/nvim && ln -s ~/code/dotfiles/my_tmux.conf ~/.tmux.conf'
bindkey '\e[A' history-search-backward
bindkey '\e[B' history-search-forward
# APPS
alias te='open -e' #textedit
alias f='open .' #open folder in finder
# DOCKER
alias docker-clean='docker stop $(docker ps -a -q);docker rm $(docker ps -a -q);docker rmi $(docker images -q)'
alias docker-prune='docker rmi $(docker images -f "dangling=true" -q)'
export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"
export PATH=$PATH:$HOME/Applications
alias ~='cd ~'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ls='ls -halF'
alias lsc='ls -C'
alias lsf='ls -la | grep ^-' #files only
alias lsd='ls -la | grep ^d' #dirs only
alias rds="find . -name '*.DS_Store' -type f -delete"
alias ip='ifconfig | grep "inet "'
alias size10='find . -type d -print0 | xargs -0 du -s | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}'
alias sprof="source ${HOME}/.zshrc"
# Git Alias from bash it
alias gw="git whatchanged"
alias gaa="git add .;git commit --amend --no-edit"
alias gaap="git add .;git commit --amend --no-edit;git push -f"
# Mouse
alias fastmouse='defaults write -g com.apple.mouse.scaling 17'
# GO
export GOPATH=$HOME/.go
export PATH=$PATH:$GOPATH/bin
# Networking
alias openports='sudo lsof -i -P | grep -i "listen"'
alias hosts='s /private/etc/hosts'
alias h='curl -sIX GET -w "Total time: %{time_total} s\n"' #issues GET request, only prints response headers and time it took.
# Gradle
export GRADLE_OPTS="-Dorg.gradle.daemon=true"
# PATH
export PATH=.:$PATH #Current directory
export PATH=$PATH:"$SCRIPTS_DIR" #other scripts under version control
export PATH=/usr/local/bin:$PATH #Homebrew
export USE_OH_MY_ZSH="true"
export ZSH_THEME="sunrise"