Skip to content

Instantly share code, notes, and snippets.

@f440
Created April 30, 2014 01:59
Show Gist options
  • Save f440/11416541 to your computer and use it in GitHub Desktop.
Save f440/11416541 to your computer and use it in GitHub Desktop.
brew install ./zsh-autosuggestions.rb --HEAD
require 'formula'
class ZshAutosuggestions < Formula
homepage 'https://github.com/tarruda/zsh-autosuggestions'
head 'https://github.com/tarruda/zsh-autosuggestions.git'
def install
(share/'zsh-autosuggestions').install Dir['*']
end
def caveats
<<-EOS.undent
Add the following at the end of your .zshrc:
# Setup zsh-autosuggestions
source #{HOMEBREW_PREFIX}/share/zsh-autosuggestions/autosuggestions.zsh
# Enable autosuggestions automatically
zle-line-init() {
zle autosuggest-start
}
zle -N zle-line-init
You will also need to force reload of your .zshrc:
source ~/.zshrc
EOS
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment