Quickly ack, open and search for a term
I've come to love fish shell recently. In it, I've defined this va
alias that is super-helpful for quickly finding, opening and highlighting a term in a file:
function va
ack -li -- "$argv" ^/dev/null | xargs -o vim -c "/$argv"
end
The equivalent in POSIX shells of course is:
va () {
ack -li -- "$@" 2>/dev/null | xargs -o vim -c "/$@"
}
Written by Vincent Driessen
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#