The uninstall command supports the syntax "flatpak uninstall
org.gnome.Builder stable" as an alternative to "flatpak uninstall
org.gnome.Builder//stable", but this support was broken by the fuzzy
matching (partial ref) feature. Since that syntax only supported full
app IDs not partial ones, assume it's being used if the first argument
is a full app ID and the second argument looks like a branch. This means
we don't support the syntax "flatpak uninstall builder stable" (unless
you're trying to uninstall an app called stable).
Similarly, fix the install command's support for the syntax "flatpak
install flathub org.gnome.Builder stable".
Also, add a unit test for both of the above.
Fixes https://github.com/flatpak/flatpak/issues/2395Closes: #2405
Approved by: matthiasclasen