From 32fb7930d825a4c04aedcd2972c2447bfc9adc51 Mon Sep 17 00:00:00 2001 From: William Gallios Date: Fri, 21 Nov 2014 13:51:19 -0800 Subject: [PATCH 1/3] created simple install script --- install | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 install diff --git a/install b/install new file mode 100755 index 0000000..8432fc8 --- /dev/null +++ b/install @@ -0,0 +1,32 @@ +#!/bin/sh + +# Install script for zsh-autocomplete + +#first checks if ~/.zshrc file exists and is readable +if [ ! -r ~/.zshrc ]; then + echo "\nError: ~/.zshrc file does not exist or is not readable!\n" + exit 1 +fi + +DIR=$(dirname $(readlink -e $0)) ; + +# appends the string to ~/.zshrc file +cat >> ~/.zshrc << EOF + +# Setup zsh-autosuggestions +source $DIR/autosuggestions.zsh + +# Enable autosuggestions automatically +zle-line-init() { + zle autosuggest-start +} + +zle -N zle-line-init + +# use ctrl+t to toggle autosuggestions(hopefully this wont be needed as +# zsh-autosuggestions is designed to be unobtrusive) +bindkey '^T' autosuggest-toggle +EOF + +echo "\nSetup completed successfully!\n" +exit 0 From 0d9aabedb2bcae48538fa7b1fc30aef83fe878a2 Mon Sep 17 00:00:00 2001 From: William Gallios Date: Fri, 21 Nov 2014 13:54:47 -0800 Subject: [PATCH 2/3] updated readme for new install script --- README.mkd | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/README.mkd b/README.mkd index 0efd821..18d7fd6 100644 --- a/README.mkd +++ b/README.mkd @@ -5,26 +5,9 @@ > [Fish](http://fishshell.com/)-like fast/unobtrusive autosuggestions for zsh. ## Installation - -```sh -$ git clone git://github.com/tarruda/zsh-autosuggestions ~/.zsh-autosuggestions - -$ cat >> ~/.zshrc << "EOF" - -# Setup zsh-autosuggestions -source ~/.zsh-autosuggestions/autosuggestions.zsh - -# Enable autosuggestions automatically -zle-line-init() { - zle autosuggest-start -} -zle -N zle-line-init - -# use ctrl+t to toggle autosuggestions(hopefully this wont be needed as -# zsh-autosuggestions is designed to be unobtrusive) -bindkey '^T' autosuggest-toggle -EOF - +``` + $ git clone git://github.com/tarruda/zsh-autosuggestions ~/.zsh-autosuggestions + sh .zsh-autosuggestions/install ``` Any widget that moves the cursor to the right(forward-word, forward-char...) From 9e710593e3979d0aa8f0da2c1fb728070b61b2dc Mon Sep 17 00:00:00 2001 From: William Gallios Date: Fri, 21 Nov 2014 13:59:25 -0800 Subject: [PATCH 3/3] updates to readme --- README.mkd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.mkd b/README.mkd index 18d7fd6..f4e1a8b 100644 --- a/README.mkd +++ b/README.mkd @@ -6,7 +6,7 @@ ## Installation ``` - $ git clone git://github.com/tarruda/zsh-autosuggestions ~/.zsh-autosuggestions + $ git clone git://github.com/wgallios/zsh-autosuggestions ~/.zsh-autosuggestions sh .zsh-autosuggestions/install ```