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