-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
106 lines (78 loc) · 4.32 KB
/
dot_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
# Amazon Q pre block. Keep at the top of this file.
[[ -f "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh" ]] && builtin source "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh"
# Enable Antdote
source $HOMEBREW_PREFIX/opt/antidote/share/antidote/antidote.zsh
# Enable Powerlevel10k instant prompt
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
# Enable .nvmrc autoload
zstyle ':omz:plugins:nvm' autoload yes
# Initialize Antidote plugins statically with ${ZDOTDIR:-~}/.zsh_plugins.txt
antidote load
# Load Powerlevel10k configuration
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Load fzf configuration
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# Load nvm configuration and completion
export NVM_DIR="$HOME/.nvm"
export NVM_HOMEBREW=$(brew --prefix nvm)
[ -s "$NVM_HOMEBREW/nvm.sh" ] && . "$NVM_HOMEBREW/nvm.sh"
[ -s "$NVM_HOMEBREW/etc/bash_completion.d/nvm" ] && . "$NVM_HOMEBREW/etc/bash_completion.d/nvm"
# Load SDKMAN! configuration
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
# Load navi completion
eval "$(navi widget zsh)"
# Load 1Password CLI completion
eval "$(op completion zsh)"; compdef _op op
# Load Color LS completion
source $(dirname $(gem which colorls))/tab_complete.sh
# Load pipx
export PATH="$PATH:/Users/marvinstickel/.local/bin"
# Load Console Ninja
PATH=~/.console-ninja/.bin:$PATH
# Load secrets
[ -f ~/.secrets ] && source ~/.secrets
# Expose AWS MFA device ID from secrets - PRISMA
export MFA_DEVICE_ID=$MFA_DEVICE_ID
# Expose ZSH path
export ZSH=$(antidote path ohmyzsh/ohmyzsh)
# Expose ANDROID_NDK_HOME
export ANDROID_NDK_HOME="$HOMEBREW_PREFIX/share/android-ndk"
# Expose ANDROID_HOME
export ANDROID_HOME="/Users/marvinstickel/Library/Android/sdk"
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools
# Add SSH Keys to Keychain
ssh-add --apple-use-keychain ~/.ssh/id_ed25519 2>/dev/null
# Add Color LS alias
alias lsc='colorls -A --sd'
# Add NeoVim alias
alias vi='nvim'
alias vim='nvim'
# Add swamp alias - PRISMA
alias aws_prisma_ent="swamp --target-profile default --target-role power-user --profile prisma-idp --account 094750960340 --mfa-device $MFA_DEVICE_ID --region eu-central-1 -mfa-exec 'op item get jeqiksaua6jisn5zlwblngzr4e --otp'"
alias aws_prisma_int="swamp --target-profile default --target-role power-user --profile prisma-idp --account 071197997811 --mfa-device $MFA_DEVICE_ID --region eu-central-1 -mfa-exec 'op item get jeqiksaua6jisn5zlwblngzr4e --otp'"
alias aws_prisma_test="swamp --target-profile default --target-role power-user --profile prisma-idp --account 806515583069 --mfa-device $MFA_DEVICE_ID --region eu-central-1 -mfa-exec 'op item get jeqiksaua6jisn5zlwblngzr4e --otp'"
alias aws_prisma_kon="swamp --target-profile default --target-role power-user --profile prisma-idp --account 303079077654 --mfa-device $MFA_DEVICE_ID --region eu-central-1 -mfa-exec 'op item get jeqiksaua6jisn5zlwblngzr4e --otp'"
alias aws_prisma_prod="swamp --target-profile default --target-role power-user --profile prisma-idp --account 033690830626 --mfa-device $MFA_DEVICE_ID --region eu-central-1 -mfa-exec 'op item get jeqiksaua6jisn5zlwblngzr4e --otp'"
function aws_prisma_artifacts {
swamp --target-profile default --target-role prisma-artifacts-user --profile prisma-idp --account 762873164855 --mfa-device $MFA_DEVICE_ID --region eu-central-1 -mfa-exec 'op item get jeqiksaua6jisn5zlwblngzr4e --otp'
aws codeartifact login --tool npm --repository mirror --domain mirror --namespace @prisma-internal
}
# Remove conflicting aliases
unalias gk # Conflict with gitkraken-cli
# Swap pi and pin alias
alias pi="pnpm install"
alias pin="pnpm init"
# Add pnpm storybook alias
alias psb="pnpm run storybook"
# Enable automatic update for oh-my-zsh
zstyle ':omz:update' mode auto
# Fix slow paste speeds with zsh-syntax-highlighting
zstyle ':bracketed-paste-magic' active-widgets '.self-*'
# Enable zoxide. Keep at the bottom of this file.
eval "$(zoxide init zsh)"
# Amazon Q post block. Keep at the bottom of this file.
[[ -f "${HOME}/Library/Application Support/amazon-q/shell/zshrc.post.zsh" ]] && builtin source "${HOME}/Library/Application Support/amazon-q/shell/zshrc.post.zsh"