Limiting silver-searcher to only search specific file types
--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Cosmic Puzzle
--
Chapters
00:00 Limiting Silver-Searcher To Only Search Specific File Types
00:18 Accepted Answer Score 38
00:42 Thank you
--
Full question
https://superuser.com/questions/1034741/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#ack
#avk47
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Cosmic Puzzle
--
Chapters
00:00 Limiting Silver-Searcher To Only Search Specific File Types
00:18 Accepted Answer Score 38
00:42 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