-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_zshrc
More file actions
92 lines (74 loc) · 2.22 KB
/
dot_zshrc
File metadata and controls
92 lines (74 loc) · 2.22 KB
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
# Add user bin directories to PATH (priority)
export PATH="$HOME/bin:$HOME/.local/bin:$PATH"
# Google Cloud SDK
if [ -f "$HOME/bin/google-cloud-sdk/path.zsh.inc" ]; then
source "$HOME/bin/google-cloud-sdk/path.zsh.inc"
fi
# Istio CLI
export PATH="$HOME/.istioctl/bin:$PATH"
# Add custom completions to fpath
fpath=(~/.config/zsh/completions $fpath)
# Path to oh-my-zsh installation
export ZSH="$HOME/.oh-my-zsh"
# Theme configuration
# Options: robbyrussell (default), agnoster, powerlevel10k, etc.
ZSH_THEME="robbyrussell"
# kube-ps1 configuration (must be set before plugins load)
KUBE_PS1_SYMBOL_ENABLE=true
KUBE_PS1_SYMBOL_DEFAULT="⎈ "
KUBE_PS1_SEPARATOR=" | "
KUBE_PS1_PREFIX="("
KUBE_PS1_SUFFIX=")"
# Plugin configuration
# Built-in: git, kubectl, gitfast, kube-ps1
# Custom: zsh-autosuggestions, zsh-syntax-highlighting
plugins=(
git
gitfast
kubectl
kube-ps1
zsh-autosuggestions
zsh-syntax-highlighting
)
# Load oh-my-zsh
source $ZSH/oh-my-zsh.sh
# Customize prompt to include kube-ps1
# Prepend kubernetes context/namespace to prompt
PROMPT='$(kube_ps1)'$PROMPT
# User configuration
# Set default editor
export EDITOR='vim'
export VISUAL='vim'
# History configuration
HISTSIZE=10000
SAVEHIST=10000
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_FIND_NO_DUPS
setopt SHARE_HISTORY
# Load modular configurations
if [ -f "$HOME/.config/zsh/aliases.zsh" ]; then
source "$HOME/.config/zsh/aliases.zsh"
fi
if [ -f "$HOME/.config/zsh/git.zsh" ]; then
source "$HOME/.config/zsh/git.zsh"
fi
if [ -f "$HOME/.config/zsh/kubectl.zsh" ]; then
source "$HOME/.config/zsh/kubectl.zsh"
fi
# kube-ps1: Start with kubernetes prompt enabled
# Toggle: kubeon / kubeoff
kubeon
# Google Cloud SDK completion
if [ -f "$HOME/bin/google-cloud-sdk/completion.zsh.inc" ]; then
source "$HOME/bin/google-cloud-sdk/completion.zsh.inc"
fi
# Auto-start tmux
# Only start if:
# - tmux is installed
# - we're not already in a tmux session
# - we're not in an embedded terminal (like Emacs)
if command -v tmux &> /dev/null && [ -z "$TMUX" ] && [ -z "$INSIDE_EMACS" ]; then
# Attach to existing 'default' session or create new one
# Suppress error message if session doesn't exist
tmux attach-session -t default 2>/dev/null || tmux new-session -s default
fi