jekyll/jekyll — pull request #1920 by tkirill (2014-01-06 19:24:40+00:00)
Title: Tab completion for Bash

Fixes #1905.

This request contains one feature – Bash completion. A few other features were discussed in corresponding issue:

1. How completion script should be installed?
2. Zsh support.

I think they could be done separately.

Implementation of completion is based on implementation from Mercurial distributed SCM (http://selenic.com/hg/file/082b2930fe2c/contrib/bash_completion). Implementation details:

1. Supports all commands: build, docs, doctor, help, import, new, serve. Look at the `_jekyll_commands` function.
2. Aliases `hyde` for `doctor` and `server` for `serve` are not supported. Not sure about this.
3. Global options are supported for all commands except `help`. Look at the usings of `_jekyll_complete_with_global_opts` function.
4. Completion for arguments of `help` command.
5. Uses default Bash completion if script can't find any other options.