Permalink
Browse files

viack, edit ack results in vim

  • Loading branch information...
tsibley committed Sep 21, 2011
0 parents commit b0782bb64bc25348f314e3b695139d0837a3e08f
Showing with 13 additions and 0 deletions.
  1. +13 −0 viack
13 viack
@@ -0,0 +1,13 @@
+#!/bin/bash
+grabnext=0
+opts=''
+for arg; do
+ if [[ $grabnext != 0 || ! "$arg" =~ ^- ]]; then
+ opts="+0 +/$arg"
+ break
+ elif [[ "$arg" == "--" ]]; then
+ grabnext=1
+ fi
+done
+
+vim $opts $(ack -l "$@")

0 comments on commit b0782bb

Please sign in to comment.