mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-28 19:56:11 +00:00
trivial: refresh bash completion to reflect recent changes
This commit is contained in:
parent
6c985fac3b
commit
fbcc031ae4
@ -609,6 +609,10 @@
|
|||||||
<distro id="fedora">
|
<distro id="fedora">
|
||||||
<package />
|
<package />
|
||||||
</distro>
|
</distro>
|
||||||
|
<distro id="ubuntu">
|
||||||
|
<control />
|
||||||
|
<package variant="x86_64" />
|
||||||
|
</distro>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency type="build" id="libxmlb-dev">
|
<dependency type="build" id="libxmlb-dev">
|
||||||
<distro id="arch">
|
<distro id="arch">
|
||||||
|
@ -54,7 +54,8 @@ Recommends: python3,
|
|||||||
secureboot-db,
|
secureboot-db,
|
||||||
udisks2,
|
udisks2,
|
||||||
fwupd-unsigned,
|
fwupd-unsigned,
|
||||||
fwupd-signed
|
fwupd-signed,
|
||||||
|
jq
|
||||||
Suggests: gir1.2-fwupd-2.0
|
Suggests: gir1.2-fwupd-2.0
|
||||||
Provides: fwupdate
|
Provides: fwupdate
|
||||||
Conflicts: fwupdate-amd64-signed,
|
Conflicts: fwupdate-amd64-signed,
|
||||||
|
@ -137,6 +137,7 @@ Provides: fwupdate-efi
|
|||||||
# optional, but a really good idea
|
# optional, but a really good idea
|
||||||
Recommends: udisks2
|
Recommends: udisks2
|
||||||
Recommends: bluez
|
Recommends: bluez
|
||||||
|
Recommends: jq
|
||||||
|
|
||||||
%if 0%{?have_modem_manager}
|
%if 0%{?have_modem_manager}
|
||||||
Recommends: %{name}-plugin-modem-manager
|
Recommends: %{name}-plugin-modem-manager
|
||||||
|
@ -65,7 +65,7 @@ _fwupdmgr_opts=(
|
|||||||
_show_filters()
|
_show_filters()
|
||||||
{
|
{
|
||||||
local flags
|
local flags
|
||||||
flags="$(command @libexecdir@/fwupdtool get-device-flags 2>/dev/null)"
|
flags="$(command fwupdtool get-device-flags 2>/dev/null)"
|
||||||
COMPREPLY+=( $(compgen -W "${flags}" -- "$cur") )
|
COMPREPLY+=( $(compgen -W "${flags}" -- "$cur") )
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,12 +76,12 @@ _show_modifiers()
|
|||||||
|
|
||||||
_show_device_ids()
|
_show_device_ids()
|
||||||
{
|
{
|
||||||
|
if ! command -v jq &> /dev/null; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
local description
|
local description
|
||||||
OLDIFS=$IFS
|
description="$(command fwupdmgr get-devices --json 2>/dev/null | jq '.Devices | .[] | .DeviceId')"
|
||||||
IFS=$'\n'
|
|
||||||
description="$(command fwupdagent get-devices 2>/dev/null | sed -e 's,"Name" :,,; s,",,g; s,\,,,g; s,[[:space:]]\+,,' | command awk '!/DeviceId/ { line = $0 }; /DeviceId/ { print $3 " { "line" }"}')"
|
|
||||||
COMPREPLY+=( $(compgen -W "${description}" -- "$cur") )
|
COMPREPLY+=( $(compgen -W "${description}" -- "$cur") )
|
||||||
IFS=$OLDIFS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_show_remotes()
|
_show_remotes()
|
||||||
@ -107,7 +107,7 @@ _fwupdmgr()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
case $command in
|
case $command in
|
||||||
activate|clear-results|downgrade|get-releases|get-results|unlock|verify|verify-update|get-updates|switch-branch)
|
activate|clear-results|downgrade|get-releases|get-results|unlock|verify|verify-update|get-updates|switch-branch|update|upgrade)
|
||||||
if [[ "$prev" = "$command" ]]; then
|
if [[ "$prev" = "$command" ]]; then
|
||||||
_show_device_ids
|
_show_device_ids
|
||||||
else
|
else
|
@ -64,22 +64,25 @@ _fwupdtool_opts=(
|
|||||||
_show_filters()
|
_show_filters()
|
||||||
{
|
{
|
||||||
local flags
|
local flags
|
||||||
flags="$(command @libexecdir@/fwupdtool get-device-flags 2>/dev/null)"
|
flags="$(command fwupdtool get-device-flags 2>/dev/null)"
|
||||||
COMPREPLY+=( $(compgen -W "${flags}" -- "$cur") )
|
COMPREPLY+=( $(compgen -W "${flags}" -- "$cur") )
|
||||||
}
|
}
|
||||||
|
|
||||||
_show_firmware_types()
|
_show_firmware_types()
|
||||||
{
|
{
|
||||||
local firmware_types
|
local firmware_types
|
||||||
firmware_types="$(command @libexecdir@/fwupdtool get-firmware-types 2>/dev/null)"
|
firmware_types="$(command fwupdtool get-firmware-types 2>/dev/null)"
|
||||||
COMPREPLY+=( $(compgen -W "${firmware_types}" -- "$cur") )
|
COMPREPLY+=( $(compgen -W "${firmware_types}" -- "$cur") )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_show_plugins()
|
_show_plugins()
|
||||||
{
|
{
|
||||||
|
if ! command -v jq &> /dev/null; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
local plugins
|
local plugins
|
||||||
plugins="$(command @libexecdir@/fwupdtool get-plugins 2>/dev/null)"
|
plugins="$(command fwupdtool get-plugins --json 2>/dev/null | jq '.Plugins | .[] | .Name')"
|
||||||
COMPREPLY+=( $(compgen -W "${plugins}" -- "$cur") )
|
COMPREPLY+=( $(compgen -W "${plugins}" -- "$cur") )
|
||||||
}
|
}
|
||||||
|
|
@ -3,27 +3,14 @@ if bashcomp.found()
|
|||||||
define_variable: bashcomp.version().version_compare('>= 2.10') ? ['datadir', datadir] : ['prefix', prefix],
|
define_variable: bashcomp.version().version_compare('>= 2.10') ? ['datadir', datadir] : ['prefix', prefix],
|
||||||
)
|
)
|
||||||
|
|
||||||
# replace @libexecdir@
|
install_data(['fwupdtool'],
|
||||||
fwupdtool_path = join_paths(libexecdir, 'fwupd')
|
install_dir : completions_dir,
|
||||||
con2 = configuration_data()
|
)
|
||||||
con2.set('libexecdir', fwupdtool_path)
|
|
||||||
configure_file(
|
|
||||||
input : 'fwupdtool.in',
|
|
||||||
output : 'fwupdtool',
|
|
||||||
configuration : con2,
|
|
||||||
install: true,
|
|
||||||
install_dir: completions_dir)
|
|
||||||
|
|
||||||
if build_daemon
|
if build_daemon
|
||||||
install_data(['fwupdagent'],
|
install_data(['fwupdagent', 'fwupdmgr'],
|
||||||
install_dir : completions_dir,
|
install_dir : completions_dir,
|
||||||
)
|
)
|
||||||
configure_file(
|
endif # build_daemon
|
||||||
input : 'fwupdmgr.in',
|
|
||||||
output : 'fwupdmgr',
|
|
||||||
configuration : con2,
|
|
||||||
install: true,
|
|
||||||
install_dir: completions_dir)
|
|
||||||
endif # build_daemon
|
|
||||||
|
|
||||||
endif # bashcomp.found()
|
endif # bashcomp.found()
|
||||||
|
Loading…
Reference in New Issue
Block a user