Browse Source

Updating ZSH Options and autocompletion

pull/1/head
Ryan Reed 3 years ago
parent
commit
b595e5918e
1 changed files with 24 additions and 14 deletions
  1. +24
    -14
      dot_zsh/configs/options.zsh

+ 24
- 14
dot_zsh/configs/options.zsh View File

@ -1,21 +1,31 @@
setopt NO_CASE_GLOB
# Allow for suggesting corrections on mistyped commands/files
setopt CORRECT
setopt CORRECT_ALL
setopt auto_list # Automatically list choices on ambiguous completion
setopt always_to_end # Move cursor to end if word had only 1 match
setopt auto_menu # Automatically use menu completion
# AUTOCOMPLETION RELATED
# zstyles and settings should come BEFORE the compinit autoload
setopt autocd # cd if directory (e.g. forgot 'cd' in command)
zstyle ':completion:*' completer _expand _complete _correct _approximate _history
zstyle ':completion:*' matcher-list '' '' 'l:|=* r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' users root
zstyle ':completion:*' menu select
zstyle :compinstall filename '~/.zshrc'
autoload -Uz compinit
autoload -U colors && colors
compinit
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' # Case insensitive completion
zstyle ':completion:*' list-suffixes
zstyle ':completion:*' expand prefix suffix
 # Partial/fragmented completion
zstyle ':completion:*' menu select # select completions with arrow keys
zstyle ':completion:*' group-name '' # group results by category
zstyle ':completion:::::' completer _expand _complete _ignored _approximate # enable approximate matches for completion
# Other Options
unsetopt beep
setopt no_beep
setopt autocd # cd if directory (e.g. forgot 'cd' in command)
autoload -Uz compinit && compinit
setopt auto_menu # Automatically use menu completion
setopt auto_list # Automatically list choices on ambiguous completion
setopt list_rows_first # List autocompletions horizontally rather than vertically
setopt always_to_end # Move cursor to end if word had only 1 match
setopt no_hup # Allow backgrounding
# Allow for suggesting corrections on mistyped commands/files
setopt CORRECT
setopt CORRECT_ALL

Loading…
Cancel
Save