Extend bash autocompletion with open and list commands.
Extend bash autocompletion with open and list commands.

Basically we now take into account what already has been completed on
the commandline. For example if the 'list' action is written then we
do not want to autocomplete the options that only apply to the 'open'
action.

Note that currently the autocompletion for 'open' simply returns all
existing note files regardless of the current directory or provided
toplevel which is not ideal.

Also note that we only autocomplete options by their full names. For
example we only suggest '--toplevel' and not '-t'. This seems sensible
as autocomplete makes typing easy and it is probably more intuitive to
see the full option rather than having the completion stop after '-t'.
It also makes it more clear as to what the options actually do.

ddddavidmartin/branch-notes,ddddavidmartin/branch-notes