-
Notifications
You must be signed in to change notification settings - Fork 1
/
zshrc
136 lines (107 loc) · 4.26 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
include () {
[[ -f "$1" ]] && source "$1"
}
export ZSH_CUSTOM="/Users/ciryon/.dotfiles/oh-my-zsh-custom"
export ZSH="/Users/ciryon/.oh-my-zsh"
# ZSH_THEME="agnoster" # fancy
# ZSH_THEME="amuse" # fancy
# ZSH_THEME="fox" # previous one
ZSH_THEME="powerlevel10k/powerlevel10k"
COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
HIST_STAMPS="yyyy-mm-dd"
plugins=(
git
dotenv
aws
nvm
#rvm
brew
#zsh-autosuggestions
)
# Plugin settings
ZSH_DOTENV_FILE=.envrc
ZSH_DOTENV_PROMPT=false
SHOW_AWS_PROMPT=true
include $ZSH/oh-my-zsh.sh
# User configuration
setopt noautomenu
setopt nomenucomplete
export ANDROID_HOME=/Users/$USER/Library/Android/sdk
# export MANPATH="/usr/local/man:$MANPATH"
export AWS_CONFIG_FILE=~/.aws/config
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Dont use universal history
unsetopt inc_append_history
unsetopt share_history
# Aliases
alias g='git'
alias xc='cd ~/Coding/XCode'
alias an='cd ~/Coding/Android'
alias ra='cd ~/Coding/Ruby_on_Rails'
alias ja='cd ~/Coding/Java'
alias js='cd ~/Coding/JavaScript'
alias ru='cd ~/Coding/Ruby'
alias is='cd ~/Coding/Istari && asp istari && echo Istari'
alias t='tmux'
alias yesterday='~/Coding/misc_scripts/yesterday.rb'
alias grep='grep --color=auto'
alias serve='python3 -m http.server'
alias r='rails'
alias subs='echo "Recursively updating Git submodules..."; git submodule update --init --recursive'
alias pico=vim
alias chrome-insecure='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-running-insecure-content --disable-web-security'
alias aws-profile="asp"
alias aws="aws-wrapper"
alias chrome="open -a \"Google Chrome\""
# alias atom="echo 'You did mean code right?'; code"
# alias code="echo 'You did vim code right? Otherwise run /usr/local/bin/code'; vim"
alias prod="node ./scripts/deploy_site.js www puls-solutions.com appen sv dryRun; echo 'config is for prod now' "
#alias logs='echo "Tailing ${PWD##*/}-${ENVIRONMENT}"; aws logs tail --format short --follow "/aws/lambda/${PWD##*/}-${ENVIRONMENT}"'
# instead get logs from shell script
alias lg=lazygit
alias vim=nvim
alias s="code .; yarn run dev"
# alias s='iterm "cd $PWD; vim ."; yarn run dev'
alias top=htop # custom top variant https://htop.dev/
alias man=tldr # custom man pages
alias pino-pretty='pino-pretty -i hostname,pid -S -t "SYS:yyyy-mm-dd HH:MM:ss"' # hide hostname,pid + single line + timestamp
alias logs=puls_aws_logs
# Pager with nice colors
export PAGER="most"
# Secrets file (not to be version controlled)
SECRETS=~/.secrets && test -f $SECRETS && source $SECRETS
# export NVM_DIR="~/.nvm"
# source ~/.nvm/nvm.sh
include ~/.rvm/scripts/rvm
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
export PATH=/usr/local/bin:/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:$RUBY_GEM_BIN:~/bin:$HOME/Coding/misc_scripts:$HOME/Coding/Istari/AWS/scripts:$HOME/dev/flutter/.pub-cache/bin:$HOME/dev/flutter/bin:$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:/opt/metasploit-framework/bin:$HOME/Coding/PulsSolutions/scripts/bin
if [[ -n $AWS_EXECUTION_ENV ]]; then
# AWS CloudConsole
alias pu='cd ~/Coding/PulsSolutions && echo Puls'
else
# Local environment
alias pu='cd ~/Coding/PulsSolutions && asp puls-dev && echo Puls'
alias cat='bat --paging=never --style "changes,rule,snip" --theme "Monokai Extended"'
# And a Fortune!
# echo ""
# tput setaf 1; fortune -s aynrand
# echo ""
# echo ""
fi
include ~/.fzf.zsh
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh