https://github.com/geany/geany/blob/bc7e64f78f33ef867c9c1dfc2dc3ab76fd962ed1... and https://github.com/geany/geany/blob/bc7e64f78f33ef867c9c1dfc2dc3ab76fd962ed1...
If we use 'ack' or 'ag' (silver search https://github.com/ggreer/the_silver_searcher ) as grep-tool, we encounter with problem like a
``` ag -nHIirF -- my_pattern ag: invalid option -- 'I' ```
``` ack -nHIirF -- ranges Unknown option: I Unknown option: F ack: Invalid option on command line ```
Currently we cannot tune that in Geany!
I propose to delete -I and -F frome the hardcode . If anybody needs he can use "Extra options" filed for that
Making the grep options configurable is a good idea, but it must have default values and behaviours that maintain the current capability for the non-grep literate user.
Simply removing the options and telling users to add them if needed isn't acceptable IMO.
I suggest we remove the options and fill/append the extra options by default with the current hardcoded options.
I also use ag these days since it's cleary superior, so it's an issue for me as well.
@kugel- do all the other options applied by various selections in the FIF dialog work with these alternatives or do they need to be modifiable as well? And is the output compatible with the parser so the "click to go to line" also works?
`-F` is only added if *use regular expressions* is not checked (or at least it should, I didn't test right now), so it should be preserved (or adapted to work everywhere).
More generally, I agree with @elextr: we should have something configurable, but not drop current features or make them not work by default. The current code is supposed to handle *grep*, not every tool that try and replace it, in a possibly incompatible way. I myself currently use a wrapper script to use `git grep` out of the box on Git repos -- it's not too pretty but it works fine.
To answer my own question above, since `-F` is applied by the regex selection, clearly those are not all compatible, so while the `-I` can go in the extra options as default, the `-F` can't.
I suggest a single configuration file option that has a list of values separated by `;` so `g_key_file` understands it and can help raed it. It would contain the base options and a pair for each setting in the order [here](https://github.com/geany/geany/blob/bc7e64f78f33ef867c9c1dfc2dc3ab76fd962ed1...) where an empty value means no option, so the default value is: ``` FIF_options=nHI;v;;i;;w;;r;;F;E; ``` It can be made visible in a single entry in `Preferences->Tools` that has lots of empty space so the entry can have a big explanatory prompt and locate it just below the `grep` entry.
github-comments@lists.geany.org