scandal-cli

0.1.0 • Public • Published

scandal-cli

A simple command line interface to scandal

screenshot

install

npm install -g scandal-cli

usage

scandal <search pattern> [<path pattern>]

It will search recursively down from the directory it was invoked from

search pattern

The term you are searching for. It will get converted into a regexp so regexp operators are ok. Depending on what the term is, you may need to wrap it in quotes so the shell doesn't mess with it.

The search term is case sensitive.

path pattern (optional)

A pattern of paths to include, globbing and regexp operators are supported, each path is separated by a comma.

To exclude paths, prefix them with ~

The examples section should make everything clear.

examples

search for either "let" or "var" in all files except in node_modules

scandal "(let|var)" ~node_modules

search for ghost in all JavaScript files

scandal ghost "*.js"

search for "allresults" or "allResults" in src/foo and src/bar, but not src/baz

scandal "all[r|R]esults" src/foo,src/bar,~src/baz

search for "monkey" in all JavaScript demos

scandal monkey "**/__demos__/**/*.js"

search for kitty in all JavaScript source files but skip tests

scandal kitty *.js,~__tests__

Tested on

A Linux box using bash and node 6.4.0.

Package Sidebar

Install

npm i scandal-cli

Weekly Downloads

0

Version

0.1.0

License

ISC

Last publish

Collaborators

  • mgreer