Skip to content

Instantly share code, notes, and snippets.

@jcsalterego
Created March 19, 2013 16:39
Show Gist options
  • Save jcsalterego/5197719 to your computer and use it in GitHub Desktop.
Save jcsalterego/5197719 to your computer and use it in GitHub Desktop.
alias vimf="~/vimf.sh"
#!/bin/bash
fatal () {
echo "No files found"
exit 1
}
if [ -z "$@" ]; then
fatal
fi
files=$(ack -l $@)
if [ -z "$files"]; then
fatal
else
echo $files
vim $files
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment