0.3.9 • Published 9 years ago

wack v0.3.9

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

wack

Build Status npm install

wack stands for Wack ACK

what?

wack aims to be a bit like ack but implemented in node. it doesn't aim to be wack, but it kind of is at the moment.

installation

npm install -g wack

usage

wack searchPattern

will search the current dir (and recursively all sub dirs) for searchPattern

options

  • -d or --dir <dir> search different dir.
  • -D or --ignoredir <dir1[,dir2...]> to ignore directories
  • -i or --ignorecase to ignore case
  • -n or --norecurse to prevent subdirectory search
  • -m or --maxcount <num> show max of <num> results per file
  • -k or --knowntypes only search files of known type
  • -t or --type <type1[,type2...]> only show results from file types listed
  • -T or --notype <type1[,type2...]> exclude results from file types listed
  • -C or --nocolor to turn off output coloring
  • -1 or --justone to only return the very first result
  • -v or --invertmatch to return lines that do not match the search pattern
  • -h or --help for help
  • -V or --version for version

as a module

alternatively, you can write directory names to wack and it will stream search results.

that looks kinda like this:

var wack = require('wack')

var wack_stream = wack({pattern: 'Sheena'})

wack_stream.on('data', dump)

wack_stream.write('./ramones_albums/')

function dump(data) {
  console.log(data)
// {
//     filename: /current/dir/ramones-albums/rocket-to-russia.txt
//   , context: 'Sheena Is a Punk Rocker'
//   , line: 6
//   , match: ['Sheena', index: 0, input: 'Sheena Is a Punk Rocker']
// }
}

for stream options, use the full flag name (ie ignorecase, invertmatch, etc) and pattern for the search pattern.

file types

file types are exactly the same as ack, except I have added markdown (which checks .md, .mkd, and .markdown) and json (which checks .json).

license

MIT

0.3.9

9 years ago

0.3.8

10 years ago

0.3.7

10 years ago

0.3.6

10 years ago

0.3.5

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.11

10 years ago

0.2.10

10 years ago

0.2.9

10 years ago

0.2.8

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

11 years ago

0.2.2

11 years ago

0.2.0

11 years ago

0.1.8

11 years ago

0.1.7

11 years ago

0.1.6

11 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.11

11 years ago

0.0.10

11 years ago

0.0.9

11 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago

0.0.0

11 years ago