zshrc: autocomplete

This commit is contained in:
Cynthia Foxwell 2023-06-12 22:25:27 -06:00
parent e76fd2b7e3
commit f0c1bbaa4e

View file

@ -9,14 +9,22 @@ if [[ -f "$HOME/.zshcfg" ]]; then
else
CONF_BINARYCLOCK=0
CONF_ENABLEGIT=0
CONF_ENABLEAC=0
CONF_FORTUNE=0
fi
if [[ $CONF_ENABLEGIT -eq 1 ]]; then
if [[ ! -d "$HOME/.zsh/gitstatus" ]]; then
git clone --depth=1 https://github.com/romkatv/gitstatus.git ~/.zsh/gitstatus
git clone --depth=1 https://github.com/romkatv/gitstatus.git "$HOME/.zsh/gitstatus"
fi
source ~/.zsh/gitstatus/gitstatus.plugin.zsh
source "$HOME/.zsh/gitstatus/gitstatus.plugin.zsh"
fi
if [[ $CONF_ENABLEAC -eq 1 ]]; then
if [[ ! -d "$HOME/.zsh/zsh-autosuggestions" ]]; then
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions.git "$HOME/.zsh/zsh-autosuggestions"
fi
source "$HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
fi
# Lines configured by zsh-newuser-install
@ -159,6 +167,8 @@ bindkey '^[[5~' history-search-backward # pgup prev in history no
bindkey '^[[6~' history-search-forward # pgdn next in history no search
bindkey '^F' expand-or-complete # ctrl+f tab
[[ $CONF_ENABLEAC -eq 1 ]] && bindkey '^G' autosuggest-accept
bindkey -r '^I'
####