Skip to content

Commit 26efc9f

Browse files
committed
feat: more zsh configuration
Signed-off-by: David Calvert <david@0xdc.me>
1 parent 5b41bad commit 26efc9f

1 file changed

Lines changed: 33 additions & 20 deletions

File tree

.zshrc

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,19 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
99
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
1010
fi
1111

12-
# Vi key bindings
13-
bindkey -v
12+
################################################################################
13+
# Key bindings
14+
################################################################################
15+
16+
# Emacs style
17+
bindkey -e
18+
19+
# Reverse incremental search
20+
bindkey '^R' history-incremental-search-backward
21+
22+
# Alternative bindings to CTRL+A & CTRL+E
23+
bindkey '\e[H' beginning-of-line
24+
bindkey '\e[F' end-of-line
1425

1526
# The following lines were added by compinstall
1627
zstyle :compinstall filename '/home/david/.zshrc'
@@ -34,13 +45,9 @@ export LANG="en_US.UTF-8"
3445
export VISUAL="/usr/bin/vim -p -X"
3546
export EDITOR="/usr/bin/vim"
3647

37-
export HISTSIZE=5000
38-
export HISTFILE="~/.histfile"
39-
export SAVEHIST=1000
40-
export HISTFILESIZE=10000
41-
export HISTCONTROL=ignoreboth
42-
export HISTIGNORE="pwd:clear"
43-
export HISTTIMEFORMAT="| %d/%m/%Y %T | "
48+
HISTSIZE=10000
49+
SAVEHIST=${HISTSIZE}
50+
HISTFILE=~/.zsh_history
4451

4552
################################################################################
4653
# Aliases
@@ -79,7 +86,6 @@ export P=$'\e[95m' # Purple
7986
################################################################################
8087

8188
# Aliases
82-
alias k="kubectl"
8389
alias kl="kubectl config get-contexts"
8490
alias kc="kubectl config set current-context"
8591

@@ -120,24 +126,31 @@ tab()
120126
# Plugins
121127
################################################################################
122128

129+
# Doc: https://github.com/ohmyzsh/ohmyzsh/wiki/plugins
123130
plugins=(
131+
ansible
132+
docker
133+
emoji
124134
git
125-
bundler
126-
dotenv
135+
gpg-agent
136+
helm
137+
kubectl
127138
macos
128-
rake
129-
rbenv
130-
ruby
139+
rust
140+
ssh-agent
131141
)
132142

133143
################################################################################
134144
# Themes
135145
################################################################################
136146

137-
#eval "$(starship init zsh)"
138-
139147
# powerlevel10k
140-
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
141-
142148
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
143-
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
149+
[[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh
150+
151+
# Source powerlevel10k theme file on Arch or MacOS
152+
if [[ "$(uname -s)" == "Linux" ]] ; then
153+
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
154+
elif [[ "$(uname -s)" == "Darwin" ]] ; then
155+
source /opt/homebrew/opt/powerlevel10k/powerlevel10k.zsh-theme
156+
fi

0 commit comments

Comments
 (0)