From d44159b5e87cbdc8fdaa448f09523e12193d7d6d Mon Sep 17 00:00:00 2001 From: David Suilea Date: Thu, 3 Aug 2017 20:15:30 +0200 Subject: [PATCH] support for installing as Oh-My-Zsh plugin (#87) --- README.md | 14 ++++++++++++++ zsh-history-substring-search.plugin.zsh | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 zsh-history-substring-search.plugin.zsh diff --git a/README.md b/README.md index a753bc6..9245dd9 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,20 @@ Using the [Homebrew]( https://brew.sh ) package manager: brew install zsh-history-substring-search echo 'source /usr/local/share/zsh-history-substring-search/zsh-history-substring-search.zsh' >> ~/.zshrc +Using [Oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh): + +1. Clone this repository in oh-my-zsh's plugins directory: + + git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search + +2. Activate the plugin in `~/.zshrc`: + + plugins=( [plugins...] zsh-history-substring-search) + +3. Source `~/.zshrc` to take changes into account: + + source ~/.zshrc + Usage ------------------------------------------------------------------------------ diff --git a/zsh-history-substring-search.plugin.zsh b/zsh-history-substring-search.plugin.zsh new file mode 100644 index 0000000..93f894d --- /dev/null +++ b/zsh-history-substring-search.plugin.zsh @@ -0,0 +1,2 @@ +0=${(%):-%N} +source ${0:A:h}/zsh-history-substring-search.zsh