The completers do not have access to the parser and cannot make any smart completing suggestions. It would be nice to be able to check what has been parsed so far. For example, this is needed in hivetool to open the root hive so it can give completions for parameters and folders. Now we have to hard-code the ThinLinc root hive.
This is just the tip of the iceberg. The problem is that we mostly use the simplistic approach that bash and bash-completion uses, where you only look at the current and previous word (never mind the word splitting issues in bug 8354). Ideally, we would parse the entire command line just like we do when running a command normally. Then we would have all the context up to the current point. It would require a more lenient parser, though, as the command line might not be complete yet.