mirror of
https://github.com/HerrCraziDev/dotfiles.git
synced 2026-04-20 14:34:21 +02:00
completion and prompt tweaks
This commit is contained in:
45
.zshrc
45
.zshrc
@@ -16,9 +16,52 @@ if [ -d $ZSH ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Personal prompt
|
# 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
|
export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
|
||||||
|
|
||||||
#Load personal term dotfiles
|
#Load personal term dotfiles
|
||||||
source "$HOME/.termrc"
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user