dotfiles.pub/_zshrc
2025-09-11 19:56:30 +02:00

49 lines
1.6 KiB
Bash
Executable file

#!/bin/zsh
zstyle ':completion:*' completer _expand _complete _ignored
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' menu select=0
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle :compinstall filename '/home/osh/.zshrc'
autoload -Uz compinit manydots-magic
compinit
manydots-magic
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=100000
setopt appendhistory nomatch notify extendedglob
bindkey -v
function zle-keymap-select {
if [[ ${KEYMAP} == vicmd ]] ||
[[ $1 = 'block' ]]; then
echo -ne '\e[1 q'
elif [[ ${KEYMAP} == main ]] ||
[[ ${KEYMAP} == viins ]] ||
[[ ${KEYMAP} = '' ]] ||
[[ $1 = 'beam' ]]; then
echo -ne '\e[5 q'
fi
}
zle -N zle-keymap-select
unset PREFERRED_SHELL
[ -f "$HOME/./config/bashrc" ] && emulate sh -c "source $HOME/./config/bashrc"
[ -f "$HOME/.bashrc" ] && emulate sh -c "source $HOME/.bashrc"
[ -f "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ] && source "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
[ -f "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" ] && source "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
[ -f "/usr/share/fzf/key-bindings.zsh" ] && source "/usr/share/fzf/key-bindings.zsh"
[ -f "/usr/share/fzf/completion.zsh" ] && source "/usr/share/fzf/completion.zsh"
setopt interactivecomments
setopt HIST_IGNORE_SPACE
eval $(thefuck --alias)
export PS1="
%{$(tput bold)%}%{$(tput setaf 1)%}[%{$(tput setaf 3)%}%n%{$(tput setaf 2)%}@%{$(tput setaf 4)%}%M %{$(tput setaf 5)%}%~%{$(tput setaf 1)%}]%{$(tput setaf 7)%}
$ %{$(tput sgr0)%}"