Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function grepmacs {
- echo "grepmacs: grep -rn $@"
- matches="$(grep -nr $@)"
- if [[ -z $matches ]]; then
- echo "No matches found";
- return
- fi
- # open every match in its own buffer and skip to correct line:
- emacs -nw $(echo $matches | sed -r 's/([^:]*):([0-9]*):.*/+\2 \1/g')
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement