Currently flatpak's bash completion is a bit broken. It shows all files
with the appropriate extension (.flatpak or .flatpakref) rather than
just the ones starting with the characters you've already typed. So this
commit fixes that behavior by using the -X compgen option rather than
-G. For example, here's the old behavior:
$ flatpak install e<TAB>
bijiben.flatpak eos eos-runtimes
builder.flatpak eos-apps eos-sdk
and here's the new behavior:
$ flatpak install e<TAB>
eos eos-apps eos-runtimes eos-sdk
$ flatpak install b<TAB>
bijiben.flatpak builder.flatpak
Closes: #1645
Approved by: alexlarsson
Many flatpak commands only work on *.flatpak or *.flatpakref files, so
the bash auto completion showing every file is distracting and
unnecessary. This commit makes flatpak only show relevant files when
possible by using the "-G globpattern" compgen option.