Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Wondering if there's a way to look for something like ack foo "*.scss"

share|improve this question
    
Not sure about ack, but my go-to tools for such a task would be grep, followed possibly by find if there are a lot of nested folders we're going through. –  Darth Android Aug 3 '12 at 19:19

2 Answers 2

Generally ack uses predefined file types, so the pessimistic answer is "No". However, if you regularly search in .scss files, you may want to set it as a file type in your .ackrc by adding the following line:

--type-set=sassy=.scss
share|improve this answer

"*.scss" isn't a regex, but shell globbing.

Like voyager42 says about, use

--type-set=sassy=.scss

in your .ackrc and then you can do

ack foo --sassy

or if you do NOT want to search sassy files

ack foo --nosassy
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.