summaryrefslogtreecommitdiff
path: root/zscripts/zshcompmenu.zsh
blob: 0d471a5e45ecdd3e3af0c3024167c748122b0b31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env zsh

# Basic auto/tab complete
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit -d "${XDG_CACHE_HOME:-$HOME/.config}/zcompdump" # Change where .zcompdump is stored
_comp_options+=(globdots) # Include hidden files.

# Use ctrl-vi keys in tab complete menu
bindkey -M menuselect '^h' vi-backward-char
bindkey -M menuselect '^j' vi-down-line-or-history
bindkey -M menuselect '^k' vi-up-line-or-history
bindkey -M menuselect '^l' vi-forward-char
bindkey -v '^?' backward-delete-char

# Options
setopt MENU_COMPLETE		# Immediately insert first option from completion menu