Commit Graph

6 Commits

Author SHA1 Message Date
a1346054
59e86dd754 completion: bash completion files are not supposed to be executable
Signed-off-by: a1346054 <36859588+a1346054@users.noreply.github.com>
2021-08-23 12:19:03 +02:00
Matthew Leeds
9d9758c36d completion: Only show files with the correct prefix
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
2018-05-14 07:35:26 +00:00
Matthew Leeds
037a13cde0 completion: Make filename completions smarter
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.
2017-09-12 16:14:43 +02:00
Alexander Larsson
8533f06dc0 Add more completions 2016-05-30 14:54:22 +02:00
Alexander Larsson
eeaa832095 Replace bash completion shell script with C-based version
This doesn't do everything yet, but its got the basics covered.
2016-05-27 16:30:13 +02:00
Alexander Larsson
8abbc0186e Rename everything but the on-disk location to flatpak 2016-05-09 11:11:55 +02:00