Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

viack, edit ack results in vim

  • Loading branch information...
commit b0782bb64bc25348f314e3b695139d0837a3e08f 0 parents
@tsibley authored
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 "$@")
Please sign in to comment.
Something went wrong with that request. Please try again.