> I've tried adding types using all of the commands that I've found into to documentation and all over the Internet. Unfortunately I'm always the getting the same error: " No regular expression found."
> For example:
> konrad@Konrads-MacBook-Pro Users % ack --type-set=cypress:ext:ts
> ack: No regular expression found.
When you specify a type on the command line, you still have to specify the rest of the things to search. It's not a permanent addition. So you could do:
ack --type-set=cypress:ext:ts --cypress pattern
and it would search only the cypress files for the pattern.
If you want cypress available always (which is probably the case), you add that --type-set to an .ackrc file. It could be your own personal ~/.ackrc file, or it could be a project-specific one.
For more about setting types in your .ackrc file, see the ack manual ("ack --man") and then find the section called "The .ackrc file" and "Defining your own types".
You can put types and other handy things in your .ackrc file. Here's what mine looks like:
$ cat .ackrc
I always want the files sorted, I always want to use --smart-case, and I have definitions for pytest and jenkins files.
Does that help?