From 96a549b6dff783bef667811a51a51ca3a42f82df Mon Sep 17 00:00:00 2001 From: Ambrose Chua Date: Sat, 22 Sep 2018 20:43:47 +0800 Subject: [PATCH] Add zsh-autosuggestions --- .dockerfile | 1 + .install/zsh-autosuggestions.sh | 17 +++++++++++++++++ .zshrc | 6 ++++++ 3 files changed, 24 insertions(+) create mode 100644 .install/zsh-autosuggestions.sh diff --git a/.dockerfile b/.dockerfile index 80195ac..bd9b748 100644 --- a/.dockerfile +++ b/.dockerfile @@ -21,6 +21,7 @@ RUN ./.install/zsh.sh RUN ./.install/neovim.sh # shell config, env manager RUN ./.install/pure.sh +RUN ./.install/zsh-autosuggestions.sh RUN ./.install/thefuck.sh RUN ./.install/yadm.sh # languages diff --git a/.install/zsh-autosuggestions.sh b/.install/zsh-autosuggestions.sh new file mode 100644 index 0000000..fdfc637 --- /dev/null +++ b/.install/zsh-autosuggestions.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e +source ./.versions + +echo +echo "Installing zsh-autosuggestions..." +echo + +apk add --no-cache --virtual .build-deps \ + git + +git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions +cd ~/.zsh/zsh-autosuggestions +git checkout v0.4.3 + +apk del .build-deps diff --git a/.zshrc b/.zshrc index 2b27ad8..db4cfe3 100644 --- a/.zshrc +++ b/.zshrc @@ -17,10 +17,16 @@ setopt auto_cd setopt interactivecomments setopt extended_glob +# editor +export EDITOR=nvim + # pure autoload -U promptinit; promptinit prompt pure +# autosuggestions +source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh + # thefuck eval $(thefuck --alias nope)