-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
70 lines (63 loc) · 2.75 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
# ------------------------------------------
# Paths and Config Options
# ------------------------------------------
export PATH="$PATH:/opt/homebrew/opt/node/bin:$HOME/.composer/vendor/bin:/opt/homebrew/bin"
export NODE_PATH="$NODE_PATH:$HOME/npm/lib/node_modules"
export NVM_DIR="$HOME/.nvm"
export EDITOR="/usr/local/bin/vim"
export HISTCONTROL=ignoreboth
export HISTSIZE=1000
export HISTFILESIZE=2000
export CLICOLOR=1
export LSCOLORS=AxfxBxDxcxegedabagacad
export GREP_COLORS="ms=01;31:mc=01;31:sl=01;34:cx=01;34:fn=35:ln=32:bn=32:se=36"
export PWGEN_SPECIAL=\'\"\@\?\^\&\*\(\)\`\:\~\?\;\:\[\]\{\}\.\,\\\/\|
export WORKSPACE="$HOME/Workspace"
# ------------------------------------------
# Node Version Manager (NVM)
# ------------------------------------------
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh"
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"
# ------------------------------------------
# Load Modules and Completion
# ------------------------------------------
autoload -Uz compinit && compinit
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
# ------------------------------------------
# External Tools
# ------------------------------------------
eval "$(direnv hook zsh)"
# Skip .DS_Store and .localized on tab tab
zstyle ':completion:*:*:*:*:*files' ignored-patterns '.DS_Store' '.localized'
# ------------------------------------------
# Prompt Configuration
# ------------------------------------------
PROMPT='%K{060} #%! %k %F{111}%n%f@%F{111}%m%f:%F{104}%~%f%# '
RPROMPT=\$vcs_info_msg_0_
zstyle ':vcs_info:*' formats '%K{060} ᚠ %b %k [%c%u]'
zstyle ':vcs_info:git:*' actionformats '%K{red} %b|%a %k'
# ------------------------------------------
# Aliases
# ------------------------------------------
alias ls='ls -AGFh --color=auto'
alias tree='tree -a -C --dirsfirst -L 2 --noreport'
alias pwgen='pwgen -cnyB 32 1 -r $PWGEN_SPECIAL | tr -d "\n" | pbcopy; echo -n "Password copied to clipboard: "; pbpaste; echo'
alias myip='curl -s ifconfig.co | tr -d "\n" | pbcopy; echo -n "IP Address is: "; pbpaste; echo'
alias pubkey='op item get "SSH Key - Primary" --fields "public key" | pbcopy; echo "ED25519 pub key copied to clipboard."'
alias ping='ping -c 10'
alias sudo='sudo '
alias grep='grep --color=auto'
alias phpstan='phpstan --memory-limit=512M'
alias cdws='cd $WORKSPACE'
alias reload='source ~/.zshrc'
# ------------------------------------------
# Load External Configurations
# ------------------------------------------
if command -v fzf > /dev/null; then
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
fi
[ -f ~/.config/op/plugins.sh ] && source ~/.config/op/plugins.sh
[ -f ~/.zfunctions ] && source ~/.zfunctions