The new function, flatpak_compete_columns, takes an array
of Column structs and completes a --columns= option.
Unfortunately, bash completion does not let us do better
than repeating the entire list of columns for every
possible completion. This is not ideal, but at least
it gives good results for the first column.
Closes: #2445
Approved by: alexlarsson
Ostree just gives us a generic G_IO_ERROR_FAILED (boo!),
so we need to scrape the message to infer that this was
out-of-space. Translate this to an explicit error code
that we handle in the UI.
Closes: #2477
Approved by: alexlarsson
printf(), and by extension, g_print() interprets
field width in terms of bytes, not characters.
Therefore, using %*s for padding strings with
non-ASCII characters does not work. Instead, use
the new utility function for aligned lines.
Closes: #2502
Approved by: alexlarsson
printf(), and by extension, g_print() interprets
field width in terms of bytes, not characters.
Therefore, using %*s for padding strings with
non-ASCII characters does not work. Instead, use
the new utility function for aligned lines.
While we are doing this, also fix up the alignment of
the extension sections in the output.
Closes: #2502
Approved by: alexlarsson
Add a new utility for printing
TITLE: value
while properly handling Unicode wrt to alignment.
This will be shared between info and remote-info.
Closes: #2502
Approved by: alexlarsson
We are allowing Unicode output, so we need to
use g_utf8_strlen whenever we want to count the
number of columns occupied by a string.
Closes: #2502
Approved by: alexlarsson
These options were not showing up in completion,
and, if present in the commandline, would prevent
further completion, despite being accepted by
the run command.
Closes: #2534
Approved by: alexlarsson
The info command has its own --system/--user/--installation
options, but it was not setting a name for the argument
of --installation. This was showing up in the completion
missing a '=' after --installation.
Closes: #2534
Approved by: alexlarsson
Move this typedef to flatpak-complete.h, where it
belongs. Also add a autoptr definition for it and use
it to avoid leaking the completion in flatpak-main.c.
Closes: #2534
Approved by: alexlarsson
We can look at the error that is returned
by flatpak_transaction_run, no need for this
cli-transaction specific api.
Note that we need to be a little careful to
return the expected error: when there is
an operation error, we need to return that,
instead of an ABORTED error.
Update all users.
Closes: #2556
Approved by: alexlarsson
When reinstalling refs during repair, the formatted
output of FlatpakCliTransaction is not appropriate.
Use a FlatpakQuietTransaction instead.
Closes: #2556
Approved by: alexlarsson
Move this minor convenience api into its only user.
Using only generic FlatpakTransaction apis lets us
switch out transaction instances easily.
Closes: #2556
Approved by: alexlarsson
When the --app-runtime option was added to the list command, -a was made
its shortcut, but this already belongs to --all, so return it to the
latter.
Closes: #2543
Approved by: matthiasclasen
After ellipsizing nicely, we try to spread the extra
shortfall around, but we need to stop when we've
exhausted the available shrinkage and give up.
Some tables are just too wide.
This was showing up as an infinite loop with
flatpak remote-ls --columns=app,opt flathub
Closes: #2496
Approved by: matthiasclasen
We were printing the full program name as prefix for warnings,
which does not really help with readability. Lets just use
the single-char 'F:' prefix for all messages, regardless of
log level.
Closes: #2472
Approved by: matthiasclasen
Some code paths deep inside flatpak-dir.c use
g_warning to report non-fatal errors. This disrupts
our table formatting without showing up visibly
in the output (since it gets wiped out by the next
redraw). Improve things by installing our own
message handler and showing these messages properly
inside our table, like other errors.
Closes: #2472
Approved by: matthiasclasen
Similar to the --gl-drivers option, print the installation
paths for all system installations, including custom
installations defined in ${sysconfdir}/flatpak/installations.d/
Closes: #2122
Approved by: matthiasclasen
When the -s option is used, it is likely that
the result is getting screenscraped and reparsed.
Make that easier by producing a plain number in
this case.
Closes: #2536
Approved by: mwleeds
Error out for all combinations of options that specify
more than one installations.
This was showing up e.g. with
flatpak config --installation=extra --system --get languages
Closes: #2511
Approved by: mwleeds
Move the -s short option from --src-repo to --subject,
as the docs say. This makes more sense, to go with -b
for --body.
Closes: #2527
Approved by: mwleeds
This is purely cosmetic, but it just does not make
sense to have the --oci option show up in the middle
of gpg-related options.
Closes: #2528
Approved by: mwleeds