completion and prompt tweaks

This commit is contained in:
2023-03-23 11:14:01 +01:00
parent e7645ec2c8
commit b0d2ed88ca

45
.zshrc
View File

@@ -16,9 +16,52 @@ if [ -d $ZSH ]; then
fi
# Personal prompt
export PROMPT="%F{yellow}[ %F{green}%B%n%F{yellow}@%F{cyan}%m %F{blue}%~%b %F{yellow}] %(!.%F{red}.%F{yellow})%B$%b%f "
if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
c_host='%F{magenta}%M%f'
else
c_host='%F{cyan}%m%f'
fi
export PROMPT="%F{yellow}[ %F{green}%B%n%F{yellow}@$c_host %F{blue}%~%b %F{yellow}] %(!.%F{red}.%F{yellow})%B$%b%f "
export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
#Load personal term dotfiles
source "$HOME/.termrc"
# The following lines were added by compinstall
zstyle ':completion:*' completer _list _expand _complete _ignored _approximate _prefix
zstyle ':completion:*' expand prefix
zstyle ':completion:*' file-sort name
zstyle ':completion:*' ignore-parents parent
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' matcher-list '+m:{[:lower:]}={[:upper:]} m:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+m:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._-]=** r:|=**' '+m:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' '+m:{[:lower:][:upper:]}={[:upper:][:lower:]}'
zstyle ':completion:*' max-errors 3
zstyle ':completion:*' menu select=long
zstyle ':completion:*' preserve-prefix '//[^/]##/'
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' squeeze-slashes true
zstyle :compinstall filename '/home/glrf/.zshrc'
# Prevent suggesting items already present
zstyle ':completion:*:rm:*' ignore-line yes
zstyle ':completion:*:mv:*' ignore-line yes
zstyle ':completion:*:cp:*' ignore-line yes
# Complete 'sudo' - add root paths
zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin
# Load completion
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000
setopt autocd beep notify
bindkey -e
# End of lines configured by zsh-newuser-install