Set Up Bash Completion for ArangoDB: Step-by-Step Guide
I was interested in how bash auto-completion works and how to write a custom completer. After about an hour of work, I came up with a solution that at least seems to work on Ubuntu. I now have auto-completion for ArangoDB and all its client tools!
The problem
I use the command-line for almost everything, including starting and stopping ArangoDB and its client tools. They provide lots of options which I cannot completely memorize.
The bash solution for “I don’t know what I am looking for” is to press the TAB key. This will bring up a list of suggestions for how to complete the currently entered word. I thought using the same thing for ArangoDB’s command-line options would be nice, too.
Get the latest tutorials, blog posts and news: