tools: ratbagctl: fix 'set' processing when the device is missing
is it a hack or the correct way?
triggered by: sudo ./build/ratbagctl.devel led 0 set color ffffff
@@ -1213,6 +1213,9 @@ class RatbagParserSet(RatbagParserSwitch):
e.parse(subs, input_string, ns)
if len(input_string) == 3:
self.store_function(parser)
+ elif len(input_string) == 2:
+ # missing device argument
+ parser.add_argument("device", metavar='eventX')
else:
parser.set_defaults(subparse=self.sub_parse)
return parser
