I wrote a simple script in order to help someone in a recent reply from me, to make running Flatpak applications from terminal easier. After that I worked a little bit on it further and now ended up with 2 completely different approaches.
- flatrun: Run an app by a matching search filter. If multiple matches, then print all matching app ids instead.
- flatapp: Show list of installed apps in an interactive menu. Plus show a description of the app in a preview window. Run the selected application. Requires
fzf
. - flatsearch: Show search results from repository in an interactive menu. A selected entry will be installed or uninstalled if it exists already (with confirmation from
flatpak
). Requiresfzf
.
# Show all matching apps
$ flatrun F
com.github.tchx84.Flatseal
io.freetubeapp.FreeTube
# Run io.freetubeapp.FreeTube
$ flatrun freetube
# Show help for com.obsproject.Studio
$ flatrun obs --help
or flatapp
: (requires fzf
)
and new flatsearch youtube
(requires fzf
)
No, the order of the directories in the $PATH is important. If you run command by name like
grep
, then the system will lookup in $PATH beginning from first directory. If its not in the first entry, then it falls back to next entry. If you have a command with same name multiple times in different directories, then you display all found paths withwhich -a grep
in example; the first entry is what is used when running the commandgrep
.Thanks, good to know!