app: Don't overzealously tab complete options

If the user hasn't typed a '-', don't offer options in the tab
autocompletion. This is consistent with other linux commands, and less
messy.

Fixes https://github.com/flatpak/flatpak/issues/4753
This commit is contained in:
Phaedrus Leeds
2022-02-20 18:28:42 -06:00
committed by Simon McVittie
parent 0deb80efa8
commit 759a525771

View File

@@ -339,6 +339,9 @@ flatpak_complete_options (FlatpakCompletion *completion,
GOptionEntry *e = entries;
int i;
if (completion->cur == NULL || completion->cur[0] != '-')
return;
while (e->long_name != NULL)
{
if (e->arg_description)