[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omaha.pm] brew install ack



https://twitter.com/#!/deafferret/status/199874586731479040
> @nicknisi    brew install ack
> @deafferret  look at you being all perly :)
> @nicknisi    Ha! I was looking for a good tool to find text inside of files ls **/*.js | xargs ack STRING

Ya, ack is great.

   ack --js foo     

:)  Many of the types pick up lots of different filename extensions (below). But --js is pretty boring in that regard. 

   http://betterthangrep.com/

Perl++ AndyLester++

j






$ ack --help-types
Usage: ack [OPTION]... PATTERN [FILES]

The following is the list of filetypes supported by ack.  You can
specify a file type with the --type=TYPE format, or the --TYPE
format.  For example, both --type=perl and --perl work.

Note that some extensions may appear in multiple types.  For example,
.pod files are both Perl and Parrot.

    --[no]actionscript .as .mxml
    --[no]ada          .ada .adb .ads
    --[no]asm          .asm .s
    --[no]batch        .bat .cmd
    --[no]binary       Binary files, as defined by Perl's -B op (default: off)
    --[no]cc           .c .h .xs
    --[no]cfmx         .cfc .cfm .cfml
    --[no]clojure      .clj
    --[no]cpp          .cpp .cc .cxx .m .hpp .hh .h .hxx
    --[no]csharp       .cs
    --[no]css          .css
    --[no]delphi       .pas .int .dfm .nfm .dof .dpk .dproj .groupproj .bdsgroup .bdsproj
    --[no]elisp        .el
    --[no]erlang       .erl .hrl
    --[no]fortran      .f .f77 .f90 .f95 .f03 .for .ftn .fpp
    --[no]go           .go
    --[no]haskell      .hs .lhs
    --[no]hh           .h
    --[no]html         .htm .html .shtml .xhtml
    --[no]java         .java .properties
    --[no]js           .js
    --[no]jsp          .jsp .jspx .jhtm .jhtml
    --[no]lisp         .lisp .lsp
    --[no]lua          .lua
    --[no]make         Makefiles (including *.mk and *.mak)
    --[no]mason        .mas .mhtml .mpl .mtxt
    --[no]objc         .m .h
    --[no]objcpp       .mm .h
    --[no]ocaml        .ml .mli
    --[no]parrot       .pir .pasm .pmc .ops .pod .pg .tg
    --[no]perl         .pl .pm .pod .t
    --[no]php          .php .phpt .php3 .php4 .php5 .phtml
    --[no]plone        .pt .cpt .metadata .cpy .py
    --[no]python       .py
    --[no]rake         Rakefiles
    --[no]ruby         .rb .rhtml .rjs .rxml .erb .rake .spec
    --[no]scala        .scala
    --[no]scheme       .scm .ss
    --[no]shell        .sh .bash .csh .tcsh .ksh .zsh
    --[no]skipped      Files, but not directories, normally skipped by ack (default: off)
    --[no]smalltalk    .st
    --[no]sql          .sql .ctl
    --[no]tcl          .tcl .itcl .itk
    --[no]tex          .tex .cls .sty
    --[no]text         Text files, as defined by Perl's -T op (default: off)
    --[no]tt           .tt .tt2 .ttml
    --[no]vb           .bas .cls .frm .ctl .vb .resx
    --[no]verilog      .v .vh .sv
    --[no]vhdl         .vhd .vhdl
    --[no]vim          .vim
    --[no]xml          .xml .dtd .xsl .xslt .ent
    --[no]yaml         .yaml .yml