b2c8e2c819
Note: <tab> below can mean double <tab>. This commit fixes cases such like the following ones: * crash (issue !73) - e.g. KeyError: u'--mtime': - equo security oscheck --mtime <tab> - equo query graph --complete <tab> (this was due to a typo in variable name) * now prints options, previously it didn't: - equo install -a <tab> * crashed, or (with only variable name fixed) didn't print all options: - equo security oscheck --mtime <tab> (note that it worked with more special -q instead of --mtime etc.) * didn't print all options: - equo query list installed <tab> (now shows also --by-user) The following behaviour is still buggy: * last typed word (note: no space before <tab>) disappears upon completion: - equo security oscheck<tab> (not a regression) - equo install --deep<tab> (here it's an option; regression! - previously it didn't complete but didn't cause the word to be erased either) These can be corrected reliably when something like ${COMP_WORDS[COMP_CWORD]} (from complete -F) is passed to the Python side. Without this it's not possible to distinguish between `recognized_option<tab>` (completion of recognized_option) and `recognized_option <tab>`.