On Thu, 17 Dec 2009 14:02:38 +0100, Milan wrote:
Hi,
many times I use Geany's "find in files" function to search for some string inside directory. The problem is that results are not sorted at all (at least, I cannot find a critera: it isn't file timestamp or filename).
Would it be possible to sort the result alphabetically (or any other way). Just piping grep to sort(1) would be sufficient to me.
I'm not sure it's wise to include that into Geany itself. Piping the results simply to sort should be simple enough but then there is Windows (where 'sort' doesn't exist or at least behaves different from Unix-like 'sort') and, more importantly, once we would implement it, users would like to configure sorting criteria and such. Then we would need to provide a GUI for that which IMO just bloats that feature to some unnecessary extend. Alternatively, a 1.5 minute hacked shell script is attached which simply wraps the call from Geany to grep, calls the real grep and then sort its output. Simply save that script into your filesystem, make it executable (chmod +x ...) and enter the path to the script in Geany's preferences dialog, Tools tab as Grep command.
P.S. I guess I don't have to tell you that Geany is great! because you already know that :)
Hehe, thanks.
Regards, Enrico