zshrc: autocomplete
This commit is contained in:
parent
e76fd2b7e3
commit
f0c1bbaa4e
1 changed files with 13 additions and 3 deletions
|
@ -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'
|
||||
|
||||
####
|
||||
|
@ -231,4 +241,4 @@ fi
|
|||
if [[ $CONF_FORTUNE -eq 1 ]]; then
|
||||
fortune $CONF_FORTUNE_PATH
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue