48 lines
1.6 KiB
Bash
48 lines
1.6 KiB
Bash
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.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
|
|
|
|
#!/bin/zsh
|
|
#
|
|
# .zshrc - Zsh file loaded on interactive shell sessions.
|
|
#
|
|
|
|
# Zsh options.
|
|
setopt extended_glob auto_cd
|
|
|
|
# Autoload functions you might want to use with antidote.
|
|
ZFUNCDIR=${ZFUNCDIR:-$ZDOTDIR/functions}
|
|
fpath=($ZFUNCDIR $fpath)
|
|
autoload -Uz $fpath[1]/*(.:t)
|
|
|
|
# Source zstyles you might use with antidote.
|
|
[[ -e ${ZDOTDIR:-~}/.zstyles ]] && source ${ZDOTDIR:-~}/.zstyles
|
|
|
|
# Clone antidote if necessary.
|
|
[[ -d ${ZDOTDIR:-~}/.antidote ]] ||
|
|
git clone https://github.com/mattmc3/antidote ${ZDOTDIR:-~}/.antidote
|
|
|
|
# Create an amazing Zsh config using antidote plugins.
|
|
source ${ZDOTDIR:-~}/.antidote/antidote.zsh
|
|
|
|
antidote load
|
|
|
|
# zsh-history-substring-search configuration
|
|
bindkey '^[[A' history-substring-search-up # or '\eOA'
|
|
bindkey '^[[B' history-substring-search-down # or '\eOB'
|
|
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
|
bindkey "$terminfo[kcud1]" history-substring-search-down
|
|
|
|
|
|
# add kubectl autocomplete
|
|
source <(kubectl completion zsh)
|
|
|
|
# add fluxcd autocomplete
|
|
source <(flux completion zsh)
|
|
|
|
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
|
|
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
|