cli: add version to output of solaar show

This commit is contained in:
Peter F. Patel-Schneider 2021-12-23 14:18:04 -05:00
parent d5a6ef058a
commit 8ab062363e
1 changed files with 6 additions and 1 deletions

View File

@ -22,6 +22,7 @@ from logitech_receiver import receiver as _receiver
from logitech_receiver import settings_templates as _settings_templates from logitech_receiver import settings_templates as _settings_templates
from logitech_receiver.common import NamedInt as _NamedInt from logitech_receiver.common import NamedInt as _NamedInt
from logitech_receiver.common import strhex as _strhex from logitech_receiver.common import strhex as _strhex
from solaar import NAME, __version__
_F = _hidpp20.FEATURE _F = _hidpp20.FEATURE
@ -271,6 +272,9 @@ def run(devices, args, find_receiver, find_device):
assert devices assert devices
assert args.device assert args.device
print('%s version %s' % (NAME, __version__))
print('')
device_name = args.device.lower() device_name = args.device.lower()
if device_name == 'all': if device_name == 'all':
@ -289,7 +293,8 @@ def run(devices, args, find_receiver, find_device):
print('') print('')
else: else:
if dev_num == 1: if dev_num == 1:
print('Wired Devices') print('USB and Bluetooth Devices')
print('')
_print_device(d, num=dev_num) _print_device(d, num=dev_num)
dev_num += 1 dev_num += 1
return return