From 759a5257710f6dda8a35b66d25fa82e0a80bc705 Mon Sep 17 00:00:00 2001 From: Phaedrus Leeds Date: Sun, 20 Feb 2022 18:28:42 -0600 Subject: [PATCH] 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 --- app/flatpak-complete.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/flatpak-complete.c b/app/flatpak-complete.c index ba1016b7..9c68df12 100644 --- a/app/flatpak-complete.c +++ b/app/flatpak-complete.c @@ -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)