Command auto-complete could be implemented by:
indexing the man pages to extract documentation for the arguments of every command
typing a command begins a searches the index for arguments and either displays completion of the argument and/or provides a documentation panel for that argument.
or applications expose what they provide (see representational computing)
For example, if the user types grep -v, they may get an auto-complete for --invert-match. We could also provide transformations using knowledge from the index:
converting between long options and short options - useful for self-documenting shell scripts
sort arguments so they always appear in the same order
Use doclifter and parse resulting DocBook XML