dotfiles/config/shared/zsh
2025-10-20 17:08:52 +03:00

46 lines
1.3 KiB
Plaintext

export PATH="$PATH:$HOME/bin"
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export LC_COLLATE=C
eval "$(dircolors)"
export LS_COLORS="${LS_COLORS}:ln=1;33:"
KEYTIMEOUT=1
HISTFILE=$HOME/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt auto_cd interactive_comments prompt_subst
setopt append_history hist_ignore_dups hist_ignore_all_dups hist_reduce_blanks
autoload -Uz compinit
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case-insensitive
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zsh/cache
compinit
git_prompt_info() {
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
local branch=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD)
echo " %F{green}($branch)%f"
fi
}
PROMPT='%n@%m%f %F{blue}%~%f$(git_prompt_info) $ '
autoload -U up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey '^[[A' up-line-or-beginning-search
bindkey '^[OA' up-line-or-beginning-search
bindkey '^[[B' down-line-or-beginning-search
bindkey '^[OB' down-line-or-beginning-search
bindkey '^U' backward-kill-line
# alias ls='ls --color=auto --group-directories-first'
alias ls='ls --color=auto'
alias ll='ls -lF'
alias lla='ll -a'
alias ld='ls -ld */'
alias vim=nvim