I have to launch my applications using a number of prefix commands (like xvbf-run
). The launch scripts/applications have a functioning autocomplete. So the following works script1 <TAB><TAB>
.
But the following fails to work correctly {prefix with options} script1 <TAB><TAB>
(obviously). Since the options are fixed, I created a simple function:
function prefix_summary () {
{prefix with options} $@
}
I tried complete -F _longopt prefix_summary
but that doesn't work. How can I allow prefix_summary
to act like a bash prompt?
TLDR: make this $ prefix_summary <TAB><TAB>
give same autocomplete options as this $ <TAB><TAB>