Including tweaks to conditional statements I think the original conditionals would always be false. That prevents using completions which rely on identifying the penultimate and antepenultimate portions of typed commandline.
I stared getting these errors when pressing tab after 'yadm '. This seems to be due to COMP_CWORD being negative, so this is the fix I applied
* Add completion script * Add introspection