mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-08 01:45:32 +00:00
This change allows to collect data for a diagnostic report. This can be done either from the command line through the new `km-diag-report` tool, or in `km-config` from the new `Support` tab that allows to generate the report and then copy it to the clipboard or save as a file. The diagnostic report contains installed browsers and their versions and installation methods as well as the default browser. It checks for browsers installed through apt (Ubuntu/Debian), snap, and flatpak. The change also has an implementation for pacman (Arch Linux) and dnf/yum (Fedora), although these have not been tested. Fixes: #7784
18 lines
507 B
Text
18 lines
507 B
Text
# shellcheck disable=SC2148
|
|
# No hashbang for bash completion scripts! They are intended to be sourced, not executed.
|
|
|
|
_km-diag-report_completions()
|
|
{
|
|
local cur opts
|
|
COMPREPLY=()
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
opts="-h --help -o --output -v --verbose -vv --veryverbose --version"
|
|
|
|
if [[ ${cur} == -* ]] ; then
|
|
# shellcheck disable=SC2207
|
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
|
return 0
|
|
fi
|
|
}
|
|
|
|
complete -F _km-diag-report_completions km-diag-report
|