Limiting silver-searcher to only search specific file types
--------------------------------------------------
Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn
--------------------------------------------------
Track title: CC L Beethoven - Piano Sonata No 8 in C
--
Chapters
00:00 Question
00:27 Accepted answer (Score 38)
01:02 Thank you
--
Full question
https://superuser.com/questions/1034741/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#ack
#avk47
Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn
--------------------------------------------------
Track title: CC L Beethoven - Piano Sonata No 8 in C
--
Chapters
00:00 Question
00:27 Accepted answer (Score 38)
01:02 Thank you
--
Full question
https://superuser.com/questions/1034741/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#ack
#avk47
ACCEPTED ANSWER
Score 38
Succintly,
ag active_record --ruby
Also you can use:
ag --list-file-types
to list the supported file types
Otherwise you can limit by extension (also for unknown filetypes) by providing a regex as follows:
ag -G'\.rb$' active_record
Edited due to correction by bobbaluba