I am trying to code an autocomplete script. It should also outputs some description. I have one function that manage the autocompletation AND the fetching of the description. The autocompletion related part works fine but i have an issue when i want to display the help. In short, this is what i have now :
$> myFunction -myOption1<TAB>
Description for myOption1<CURSOR>
What i woud like :
$> myFunction -myOption1<TAB>
Description for myOption1
$> myFunction -myOption1<CURSOR>
There is no conflict between the autocompletion and the output. The description can only be displayed when the myOption1 is complete. (myOpt will be completed as myOption1 and hence, does not display the description). I made severals attempts to make it work but i guess i am missing a step. The "Description for myOption1" is an 'echo'. I think it's related because compgen is waiting for some value (I give it none for the moment). I tried to trick compgen with some escape characters, spaces : no successes. The autocomplete script should continue to run after this description.
Thanks in advance for the help ;-)
Kol