Skip to content

Instantly share code, notes, and snippets.

@zeero
Created January 15, 2014 12:51
Show Gist options
  • Save zeero/8435645 to your computer and use it in GitHub Desktop.
Save zeero/8435645 to your computer and use it in GitHub Desktop.
#!/bin/bash
option="-no-empty -silent -buffer-name=grep -no-split -auto-preview"
if [ $1 ]
then
pattern="::$1"
fi
target="."
if [ $2 ]
then
target=$2
fi
vi -c "set splitbelow | Unite grep:$target$pattern $option"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment