Bash completion inside backticks or $ () using full

Consider this one-line key to activate bash completion for foobar:

complete -F _known_hosts foobar

Here is a list of completion options for

> foobar <TAB> <TAB>

but not for

> $(foobar <TAB> <TAB>

or

> `foobar <TAB> <TAB>

I think it makes sense to have tab completion for expressions that are inside backticks or $ (). How can I do this job?

+4
source share

Source: https://habr.com/ru/post/1663105/


All Articles