A Bash Completion Script for Rant

The Problem

Rant is a build tool that uses Ruby as the underlying scripting language. It is a competitor to SCons (which uses Python as the programming language) but perhaps more especially to Rake, which like Rant is build on Ruby. There has been a lot written about the relationship of Rake and Rant elsewhere and I am not yet in a position to comment on this as I am only just beginning to try Rant having done some work with SCons and Rake.

The problem is that whilst Rake comes with a Bash completion script, Rant does not.

The Solution

The solution is totally clear: create a Bash completion script for Rant. Given the similarity between Rake and Rant, and having done equivalents for SCons and Gant, it is easy to take the Rake script and edit it a bit. So I came up with a script (that you can download by clicking here) that seems to do the job. It almost certainly has error and/or bugs but for the moment it ‘works for me’.

To use this script you can do one of:

The last has the advantage of working for all users of the machine but does require super-user privileges. I use the first (obviously).

Do email me if you have any feedback.