in my ~/.ackrc I have this line:
--type-add=javascript=.pkg
Now when I try to run ack foo
I get an error:
$ ack foo
ack: --type-add: Type "javascript" does not exist, creating with ".pkg" ...
What does this mean? and how do I fix it.
in my ~/.ackrc I have this line:
--type-add=javascript=.pkg
Now when I try to run ack foo
I get an error:
$ ack foo
ack: --type-add: Type "javascript" does not exist, creating with ".pkg" ...
What does this mean? and how do I fix it.
--type-add
means "Add .pkg to the list of known javascript extensions". The "add" here refers to the extension, not the type. You have the warning because there is no type called "javascript".
If you want to create a new file type called "javascript" then use --type-set=javascript=.pkg
.
If you want to add .pkg to the list of extensions recognized by the existing js
type, use --type-add=js=.pkg
.
It needs to be 'js' not 'javascript' no wonder i couldn't find it anywhere in their docs:
--type-add=js=.pkg
Your problem is that --type-add is for extending existing types; in order to create a new type, you have to use --type-set, like so:
--type-set=javascript=.pkg