If you want to try out a new type in place, then use a command like this:
ack --type-set proj:ext:csproj --type proj "some search pattern"
this will show you search results for the given type.
If you want to save the type permanently, then you have to add the following line to your $HOME/.ackrc
:
--type-set=proj:ext:csproj
Two things to note:
- The first command doesn't set the configuration permanently, only let's you try it.
- The second line in the
.ackrc
file should have =
(equals) instead of a space.
UPDATE (figured out from the Andy Lester's answer):
Instead of --type your_type_name
you can just write shortcut --your_type_name
.
--type log
or--log
– Akerboom