mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-21 23:25:33 -04:00
flatpak enter: Add completion
This was the last command without completion, so we're complete!
This commit is contained in:
1 parent
de967dfb5b
commit
0d2b3ec5d0
2 files changed
+26
-1
No files matched your search
@@ -271,3 +271,28 @@ flatpak_builtin_enter (int argc,
|
||||
|
||||
exit (status);
|
||||
}
|
||||
|
||||
gboolean
|
||||
flatpak_complete_enter (FlatpakCompletion *completion)
|
||||
{
|
||||
g_autoptr(GOptionContext) context = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
||||
context = g_option_context_new ("");
|
||||
if (!flatpak_option_context_parse (context, options, &completion->argc, &completion->argv, FLATPAK_BUILTIN_FLAG_NO_DIR, NULL, NULL, NULL))
|
||||
return FALSE;
|
||||
|
||||
switch (completion->argc)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
flatpak_complete_options (completion, global_entries);
|
||||
flatpak_complete_options (completion, options);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
+1
-1
@@ -63,7 +63,7 @@ static FlatpakCommand commands[] = {
|
||||
{ "override", "Override permissions for an application", flatpak_builtin_override, flatpak_complete_override },
|
||||
{ "export-file", "Grant an application access to a specific file", flatpak_builtin_export_file, flatpak_complete_export_file },
|
||||
{ "make-current", "Specify default version to run", flatpak_builtin_make_current_app, flatpak_complete_make_current_app },
|
||||
{ "enter", "Enter the namespace of a running application", flatpak_builtin_enter },
|
||||
{ "enter", "Enter the namespace of a running application", flatpak_builtin_enter, flatpak_complete_enter },
|
||||
|
||||
{ "\n Manage remote repositories" },
|
||||
{ "remote-add", "Add a new remote repository (by URL)", flatpak_builtin_add_remote, flatpak_complete_add_remote },
|
||||
|
||||
Reference in new issue
Block a user