diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-05-25 22:26:42 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-05-25 22:26:42 +0200 |
| commit | b69b57d8877abb398c2444b115d96b56f7dc2db6 (patch) | |
| tree | f1bcd30e3336c3549768093e61226aaffc7fbd77 | |
| parent | 2209f79d80fa59c258a82897edfd7b05f53f341b (diff) | |
| download | dotfiles-b69b57d8877abb398c2444b115d96b56f7dc2db6.tar.gz dotfiles-b69b57d8877abb398c2444b115d96b56f7dc2db6.zip | |
Add missing auto completion
| -rw-r--r-- | .config/zsh/.zshrc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index b5e9659..4ac5612 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -43,6 +43,22 @@ exit_zsh() { exit } zle -N exit_zsh bindkey '^D' exit_zsh +# Auto-completion +#autoload -U promptinit && promptinit +autoload -Uz compinit && compinit + +# Accept completion with <tab> or Ctrl+i and go to next/previous suggestions with Vi like keys: Ctrl+n/p +zmodload -i zsh/complist +accept-and-complete-next-history() { + zle expand-or-complete-prefix +} + +zle -N accept-and-complete-next-history +bindkey -M menuselect '^i' accept-and-complete-next-history +bindkey '^n' expand-or-complete +bindkey '^p' reverse-menu-complete +zstyle ':completion:*' menu select=1 + # Some other useful functionalities setopt autocd # Automatically cd into typed directory. stty intr '^q' # free Ctrl+C for copy use Ctrl+q instead @@ -51,7 +67,7 @@ stty stop undef # Disable ctrl-s to freeze terminal. stty start undef export PATH="$HOME/.local/bin:$PATH" -#export VIRTUAL_ENV_DISABLE_PROMPT=true +export VIRTUAL_ENV_DISABLE_PROMPT=true #unsetopt BEEP # Enable various options |
