to anyone wanting to rip off the command completion code:

it's really simple, and the code is not gtk specific either. just make
a copy of completion.c and completion.h. All you need is the
get_completions() function. That's the last function in completion.c

Also, take a note of the very last comment in completion.c, or else you'll
end up with a small memory leak

The code is very well commented, so it should be easy to follow.
