autoload -U colors && colors zstyle ':completion:*' completer _complete _ignored zstyle ':completion:*' menu select=1 # use colors for file completion zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} # use groups for completion zstyle ':completion:*:descriptions' format \ "%{$fg[red]%}completing %B%d%b%{$reset_color%}" zstyle ':completion:*:matches' group 'yes' zstyle ':completion:*' group-name '' # warn if there are no matches zstyle ':completion:*:warnings' format \ "%{$fg[red]%}No matches for:%{$reset_color%} %d" # display all processes for killall/... zstyle ':completion:*:processes-names' command \ 'ps c -u ${USER} -o command | uniq' # group man pages per section zstyle ':completion:*:manuals' separate-sections true zstyle ':completion:*:manuals.*' insert-sections true # verbose output zstyle ':completion:*' verbose true # show file types setopt listtypes zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s zstyle :compinstall filename '/home/daniel/.zshrc' autoload -Uz compinit compinit #HISTOPT=ignoreboth:erasedups HISTFILE=~/.histfile HISTSIZE=1000000 SAVEHIST=1000000 setopt appendhistory autocd extendedglob hist_ignore_all_dups hist_ignore_space bindkey -v PROMPT="[%{$fg[yellow]%}%n%{$reset_color%}@%m] %{$fg[cyan]%} %2~ %#%{$reset_color%} " precmd() { print -Pn "\e]0;%n@%m: %~\a" } unsetopt multibyte # Enable Ctrl-x-e to edit command line autoload -U edit-command-line # Emacs style zle -N edit-command-line bindkey '^xe' edit-command-line bindkey '^x^e' edit-command-line # Vi style: # zle -N edit-command-line bindkey -M vicmd v edit-command-line # key bindings 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 # for rxvt bindkey "\e[8~" end-of-line bindkey "\e[7~" beginning-of-line # for non RH/Debian xterm, can't hurt for RH/DEbian xterm bindkey "\eOH" beginning-of-line bindkey "\eOF" end-of-line # for 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 # up and down arrows for hist search bindkey "^[[A" history-search-backward bindkey "^[[B" history-search-forward bindkey "^r" history-incremental-search-backward alias ls="ls --color=auto" alias el="exa --color=auto --long" alias et="erd -HI" export EDITOR="nvim" export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" if [ -f ~/.ssh/agent.env ] ; then . ~/.ssh/agent.env > /dev/null if ! kill -0 $SSH_AGENT_PID > /dev/null 2>&1; then echo "Stale agent file found. Spawning new agent… " eval `ssh-agent | tee ~/.ssh/agent.env` #ssh-add fi else echo "Starting ssh-agent" eval `ssh-agent | tee ~/.ssh/agent.env` #ssh-add fi [ -f ~/.profile ] && source ~/.profile [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh [ -f ~/.config/broot/launcher/bash/br ] && source ~/.config/broot/launcher/bash/br