diff --git a/README.mkd b/README.mkd index 0efd821..9fc24fc 100644 --- a/README.mkd +++ b/README.mkd @@ -43,6 +43,22 @@ Emacs-mode users can simply use alt+f which is bound to forward-word The [zsh-history-substring-search](https://github.com/zsh-users/zsh-history-substring-search) plugin is also recommended. + +## With oh-my-zsh + +* Download the script or clone this repository in [oh-my-zsh](http://github.com/robbyrussell/oh-my-zsh) plugins directory: + + cd ~/.oh-my-zsh/custom/plugins + git clone git://github.com/tarruda/zsh-autosuggestions.git + +* Activate the plugin in `~/.zshrc` (in **last** position): + + plugins=( [plugins...] zsh-autosuggestions) + +* Source `~/.zshrc` to take changes into account: + + source ~/.zshrc + ## Configuration You may override default global config variables after plugin load. diff --git a/autosuggestions.zsh b/autosuggestions.zsh index d8d5f5b..f7e83b2 100644 --- a/autosuggestions.zsh +++ b/autosuggestions.zsh @@ -9,7 +9,7 @@ # ``` zmodload zsh/net/socket -source "${0:a:h}/completion-client.zsh" +source "${0:a:h}/lib/completion-client.zsh" # configuration variables AUTOSUGGESTION_HIGHLIGHT_COLOR='fg=8' diff --git a/completion-client.zsh b/lib/completion-client.zsh similarity index 100% rename from completion-client.zsh rename to lib/completion-client.zsh diff --git a/completion-server-init.zsh b/lib/completion-server-init.zsh similarity index 100% rename from completion-server-init.zsh rename to lib/completion-server-init.zsh diff --git a/completion-server.zsh b/lib/completion-server.zsh similarity index 100% rename from completion-server.zsh rename to lib/completion-server.zsh diff --git a/zsh-autosuggestions.plugin.zsh b/zsh-autosuggestions.plugin.zsh new file mode 100644 index 0000000..9378846 --- /dev/null +++ b/zsh-autosuggestions.plugin.zsh @@ -0,0 +1 @@ +source ${0%/*}/autosuggestions.zsh