I have a custom completion script I'm working on that has a few different functions used for completion (I'm modifying existing completion scripts so I can't change some of them)
__start_k -> calls __k_handle_word -> calls __k_handle_kspace -> calls __k_kspace_parse_config
The __k_kspace_parse_config is where I run compadd for my completions
I can see it being run if I set -x in that function (I'm echoing the array at the end of the compadd command and also tried with -a array_name)
but this returns no matches even though the k_out array has values.
If I run
compdef __k_handle_kspace k
everything works as expected. I'm not sure why it matters which function I use when the function that sets the completion values is still the same.
I have some more links to the code and information here in stackoverflow but haven't been able to figure out why this is happening.
Any pointers or help on what I could be doing wrong are appreciated.
--
Justin Garrison
justingarrison.com