How does readline use compgen to get all applicable completions?
1
vote
0
answers
299
views
I'm building an alternative to
readline
and would like to have tab completion in a similar way to how readline
has tab completion. In readline
, if you type git
you get all the git subcommands as autocomplete options. But if you type ls
you get files and directories. It's pretty clear how to get those individually by invoking compgen
using one of it's options, but it's not clear how to invoke compgen
and get the same set of completions that readline
gives. Essentially completeing from all applicable sources. What option can I supply to get that behaviour?
Asked by Drew
(165 rep)
Oct 13, 2016, 12:24 AM