This is extremely simple to fix with scripts that can be automatically created on install time. Here is a quick script I just wrote. It will search for first matching app and run it. Just save the script as flatrun, give it executable bit and put it into $PATH. Run it as like this: flatrun freetube
#!/usr/bin/env bash
# flatrun e
# flatrun freetube
if [ "${#}" -eq 0 ]; then
flatpak list --app --columns=name,application
else
app="$(
flatpak list --app --columns=name,application |
grep -i -F "${@}" |
awk -F'\t' '{print $2}'
)"
if [ -z "${app}" ]; then
flatpak list --app --columns=name,application
elif [[ "$(echo "${app}" | wc -l)" -gt 1 ]]; then
echo "${app}"
else
flatpak run "${app}"
fi
fi
Edit: Just updated the script to output the list of matching apps, if it matches more than one.