-
Notifications
You must be signed in to change notification settings - Fork 138
Feature requests
These are all features that we are not implementing now.
This is not to say that we might not add them in the future, just that they're not being done now.
I would suggest the following:
Let {.abc,.xyz} be the set of valid file extensions supported by a given ack type-set 'myset'.
In the presence of a type-add=myset:includecompressed:gz user option, transparently add {.abc.gz,.xyz.gz} to that set of valid file extensions.
Search all valid files (.abc,.abc.gz,.xyz,.xyz.gz) within the specified directory tree, transparently expanding compressed ones.
In the absence of gzip from the PATH, write something informative to stderr but don't abort. No change to ack exit statuses should result from implementing this RFE.
Consider whether to support compressed formats other than gzip or whether YAGNI.
So I would add to my .ackrc:
--type-add=elisp:includecompressed:gz
...and ack would then transparently search all my elisp code as I want it to. (GH #406 by @PhilHudson)
ack -x
takes a list of files that ack will search, kind of like xargs
. It also doesn't pay any attention to --type
. A request has come in to have -x
respect --type
. (GH #614)
If ack knows --perl from --php from --sql, maybe ack could color code the search results in some way? So I can say "Oh, there's an orange file, it's PHP, I wasn't expecting that". (GH #605)
If ack finds a match in e.g. minified js file, or other files with just one or few very long lines, it will flood the output with the contents of the file and likely push all useful matches off-screen.
I would like an option to either ignore such matches altogether (maybe list the file name), or possibly to only show some number of characters worth of context around the match. (GH #596)
I tried to set the color of the context line separator characters in ack, but found ack lacks the options to do so. Ack only has support for uncolored separator characters.
The characters I'm talking about are the :
, -
, and --
characters that decorate the output when you're searching with context lines turned on:
$ ack -H -C 1 z ~/.garbage
/home/me/.garbage
2-bar
3:baz
4-qux
--
25-bar
26:baz
27-qux
I've already implemented this feature in my own repo: https://github.com/h3xx/ack2/tree/feature-color-separator