diff options
author | Alexander Larsson <alexl@redhat.com> | 2018-06-04 10:08:55 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-06-04 11:46:07 +0000 |
commit | 1463c468e22764b710b7b4ab3ef324b46002b508 (patch) | |
tree | 726bcaa18d38c8163726c10fce11e9065b8f7a3e /app/flatpak-builtins-info.c | |
parent | 376a325eda18ed3425afe898f26417c59fcdfe88 (diff) | |
download | flatpak-1463c468e22764b710b7b4ab3ef324b46002b508.tar.gz |
flatpak info: Add --show-location
This shows the location the ref is deployed to
Closes: #1753
Approved by: alexlarsson
Diffstat (limited to 'app/flatpak-builtins-info.c')
-rw-r--r-- | app/flatpak-builtins-info.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/flatpak-builtins-info.c b/app/flatpak-builtins-info.c index 0e3c2f46..50b903c2 100644 --- a/app/flatpak-builtins-info.c +++ b/app/flatpak-builtins-info.c @@ -43,6 +43,7 @@ static gboolean opt_show_size; static gboolean opt_show_metadata; static gboolean opt_show_permissions; static gboolean opt_show_extensions; +static gboolean opt_show_location; static char *opt_arch; static char **opt_installations; static char *opt_file_access; @@ -60,6 +61,7 @@ static GOptionEntry options[] = { { "show-permissions", 'M', 0, G_OPTION_ARG_NONE, &opt_show_permissions, N_("Show permissions"), NULL }, { "file-access", 0, 0, G_OPTION_ARG_FILENAME, &opt_file_access, N_("Query file access"), N_("PATH") }, { "show-extensions", 'e', 0, G_OPTION_ARG_NONE, &opt_show_extensions, N_("Show extensions"), NULL }, + { "show-location", 'l', 0, G_OPTION_ARG_NONE, &opt_show_location, N_("Show location"), NULL }, { NULL } }; @@ -172,7 +174,8 @@ flatpak_builtin_info (int argc, char **argv, GCancellable *cancellable, GError * metakey = flatpak_deploy_get_metadata (deploy); - if (opt_show_ref || opt_show_origin || opt_show_commit || opt_show_size || opt_show_metadata || opt_show_permissions || opt_file_access) + if (opt_show_ref || opt_show_origin || opt_show_commit || opt_show_size || opt_show_metadata || opt_show_permissions || + opt_file_access || opt_show_location) friendly = FALSE; if (friendly) @@ -279,6 +282,12 @@ flatpak_builtin_info (int argc, char **argv, GCancellable *cancellable, GError * g_print ("%s", formatted); } + if (opt_show_location) + { + maybe_print_space (&first); + g_print ("%s", path); + } + if (!first) g_print ("\n"); |