95 lines
3.0 KiB
Plaintext
95 lines
3.0 KiB
Plaintext
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.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
|
|
|
|
|
|
# The following lines were added by compinstall
|
|
zstyle ':completion:*' completer _complete _ignored _approximate
|
|
zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]} m:{[:lower:][:upper:]}={[:upper:][:lower:]}'
|
|
zstyle ':completion:*' max-errors 1
|
|
zstyle :compinstall filename '/home/bardo/.zshrc'
|
|
|
|
autoload -Uz compinit
|
|
compinit
|
|
# End of lines added by compinstall
|
|
|
|
zstyle ':completion:*' menu select # Select autocompletion with arrows
|
|
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} # Colored completions
|
|
|
|
|
|
# Lines configured by zsh-newuser-install
|
|
HISTFILE=~/.histfile
|
|
HISTSIZE=100000
|
|
SAVEHIST=100000
|
|
setopt hist_ignore_all_dups
|
|
setopt autocd notify
|
|
unsetopt beep extendedglob
|
|
bindkey -e
|
|
# End of lines configured by zsh-newuser-install
|
|
|
|
|
|
# Copy the current screen to the scrollback buffer, then clear the screen
|
|
ctrl_l() {
|
|
builtin print -rn -- $'\r\e[0J\e[H\e[22J' >"$TTY"
|
|
builtin zle .reset-prompt
|
|
builtin zle -R
|
|
}
|
|
zle -N ctrl_l
|
|
bindkey "^l" ctrl_l
|
|
|
|
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
|
|
|
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
|
|
|
# Common shell initialization
|
|
if [[ -f ~/.shrc_common ]] ; then
|
|
source ~/.shrc_common
|
|
fi
|
|
|
|
bindkey "\e[1~" beginning-of-line
|
|
bindkey "\e[4~" end-of-line
|
|
bindkey "\e[5~" beginning-of-history
|
|
bindkey "\e[6~" end-of-history
|
|
bindkey "\e[3~" delete-char
|
|
bindkey "\e[2~" quoted-insert
|
|
bindkey "\e[5C" forward-word
|
|
bindkey "\eOc" emacs-forward-word
|
|
bindkey "\e[5D" backward-word
|
|
bindkey "\eOd" emacs-backward-word
|
|
bindkey "\ee[C" forward-word
|
|
bindkey "\ee[D" backward-word
|
|
bindkey "^H" backward-delete-word
|
|
bindkey "^[[1;5C" forward-word
|
|
bindkey "^[[1;5D" backward-word
|
|
# RXVT-specific
|
|
bindkey "\e[8~" end-of-line
|
|
bindkey "\e[7~" beginning-of-line
|
|
# Non-RH/Debian xterm, can't hurt for RH/DEbian xterm
|
|
bindkey "\eOH" beginning-of-line
|
|
bindkey "\eOF" end-of-line
|
|
# FreeBSD console
|
|
bindkey "\e[H" beginning-of-line
|
|
bindkey "\e[F" end-of-line
|
|
# Completion in the middle of a line
|
|
bindkey '^i' expand-or-complete-prefix
|
|
|
|
# Directory stack
|
|
setopt AUTO_PUSHD # Push the current directory visited on the stack.
|
|
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
|
|
setopt PUSHD_SILENT # Do not print the directory stack after pushd or popd.
|
|
alias d='dirs -v'
|
|
for index ({1..9}) alias "$index"="cd +${index}"; unset index
|
|
|
|
source ~/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
source ~/.zsh/plugins/bd/bd.zsh
|
|
|
|
# FZF
|
|
if command -v fzf >/dev/null ; then
|
|
source /usr/share/fzf/completion.zsh
|
|
source /usr/share/fzf/key-bindings.zsh
|
|
fi
|