Release 2.2.0 of an ack Bash Completion
Tags: release, opensource, ack, bash
Published: 2022-04-26 18:05:18

---
title: Release 2.2.0 of an ack Bash Completion
published: true
description: Major extension of this bash completion implementation for ack
tags: release, opensource, ack, bash
//cover_image: https://direct_url_to_image.jpg
---
A long time ago I _fooled around_ with Bash completions and I created [several](https://github.com/jonasbn?tab=repositories&q=bash_completion&type=&language=shell&sort=). I created a basic one for the marvellous `grep` alternative `ack`, which I open sourced in [a GitHub repository](https://github.com/jonasbn/bash_completion_ack).

At some point I started using `ag` ([_the silver searcher_](https://geoff.greer.fm/ag/)), 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](https://github.com/jonasbn/bash_completion_ack/issues/1) in the repository, the first one ever actually.

The issue was filed by [@rpgoldman](https://github.com/rpgoldman), who had an improved version of the completion, based on my initial work. I kindly requested @rpgoldman created [a PR](https://github.com/jonasbn/bash_completion_ack/pull/2) 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:

```text
--actionscript
--ada
--after-context
--asm
--asp
--aspx
--bar
--batch
--bazel
--before-context
--break
--cathy
--cc
--cfmx
--clojure
--cmake
--coffeescript
--color
--color-colno
--color-filename
--color-lineno
--color-match
--column
--conf
--context
--count
--cpp
--csharp
--css
--dart
--delphi
--dump
--elisp
--elixir
--elm
--env
--erlang
--files-with-matches
--files-without-matches
--filter
--flush
--follow
--fortran
--go
--groovy
--group
--gsp
--haskell
--heading
--help
--help-colors
--help-rgb-colors
--help-types
--hh
--hpp
--html
--ignore-case
--ignore-dir
--ignore-directory
--ignore-file-r
--invert-match
--jade
--java
--js
--json
--jsp
--known-types
--kotlin
--less
--lisp
--literal
--lua
--make
--man
--markdown
--match
--matlab
--mojo
--no-filename
--no-ignore-case
--no-recurse
--nobreak
--nocolor
--nocolumn
--noenv
--nofilter
--nofollow
--nogroup
--noheading
--noignore-dir
--noignore-directory
--nopager
--nosmart-case
--nounderline
--objc
--objcpp
--ocaml
--output
--pager
--passthru
--pconf
--perl
--perltest
--php
--plone
--pod
--print0
--proximate
--purescript
--python
--rake
--range-end
--range-start
--recurse
--rr
--rst
--ruby
--rust
--sass
--scala
--scheme
--shell
--show-types
--smalltalk
--smart-case
--smarty
--sort-files
--sql
--stylus
--svg
--swift
--tcl
--tex
--thpppt
--toml
--ts
--ttml
--type
--underline
--vb
--verilog
--version
--vhdl
--vim
--with-filename
--word-regexp
--xml
--yaml
-1
-A
-B
-c
-C
-f
-g
-h
-H
-i
-I
-k
-l
-L
-n
-o
-p
-Q
-R
-s
-S
-t
-T
-v
-w
-x
```

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

- `*.conf`
- `*.mojo`
- `*.pconf`

Please visit [beyondgrep.com][BEYONDGREP] 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](https://github.com/rpgoldman) for his contribution.

[BEYONDGREP]: https://beyondgrep.com/