DEV Community

Jonas Brømsø
Jonas Brømsø

Posted on • Updated on

Release 2.2.0 of an ack Bash Completion

A long time ago I fooled around with Bash completions and I created several. I created a basic one for the marvellous grep alternative ack, which I open sourced in a GitHub repository.

At some point I started using ag (the silver searcher), and was no longer using ack as much as I used to.

I had actually forgotten all about it when, much to my surprise, I received a notification about an issue in the repository, the first one ever actually.

The issue was filed by @rpgoldman, who had an improved version of the completion, based on my initial work. I kindly requested @rpgoldman created a PR to sort of inspect the proposed changes in a more streamlined manner.

The proposed changes, where most fulfilling and extends the Bash completion, quite a lot from my very basic implementation.

My first implementation and parsed my .ackrc and created completions for my custom types.

The new release reimplements this and extracts the custom types from ack together with all the additional goodness ack offers.

So if you do ack -<tab>

You get:

Enter fullscreen mode Exit fullscreen mode

This is based on my installation, so your set might look different, since I have custom extensions for:

  • *.conf
  • *.mojo
  • *.pconf

Please visit for more information on ack and all of the command line options, which you can have completions for.

This little venture taught me two things:

  1. Open source your things, not matter how big or small, finished or semi-finished - I can be useful to others
  2. Open source is for the patient - so even after years, somebody might contribute back; Go to 1.

Thanks to @rpgoldman for his contribution.

Top comments (0)