Neil Hooey
unread,Sep 30, 2009, 1:11:27 PM9/30/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ack dev/users
I really like ack, it's almost perfect. But I do think it's important
to give the user the ability to make the output easier to read.
With an option like `ack --justify`, you can take output that looks
like this:
Foo.cpp:
1:int foo() {
24:float foo;
555:const int foogoo;
And make it more presentable like this:
1:int foo() {
24:float foo;
555:const int foogoo;
(Paste into a fixed-width editor to see, since Google Groups uses
proportional-width characters)
The amount to justify the line numbers would be calculated per-file
given the number of line numbers in the file, or the line number of
the last match.
You should also be able to manually specify the justification amount
on the command-line, so matches between all files looks uniform.
For example:
ack --justify=6
I think having ack calculate the justification amount for all files,
based on the highest line number in all matches, would be impractical
since output would be suppressed until the very last match is found.
What do you think?
- Neil