Remove a connected device.
Only works, if this is the master device.
-*-d* DEVICEID, *--deviceId* DEVICEID::
+*-d* DEVICEID, *--device-id* DEVICEID::
Specify the device you want to remove.
Use listDevices to see the deviceIds.
@Override
public void attachToSubparser(final Subparser subparser) {
- subparser.addArgument("-d", "--deviceId")
+ subparser.addArgument("-d", "--device-id", "--deviceId")
.type(int.class)
.required(true)
.help("Specify the device you want to remove. Use listDevices to see the deviceIds.");
@Override
public void handleCommand(final Namespace ns, final Manager m) throws CommandException {
try {
- int deviceId = ns.getInt("deviceId");
+ int deviceId = ns.getInt("device-id");
m.removeLinkedDevices(deviceId);
} catch (IOException e) {
throw new IOErrorException("Error while removing device: " + e.getMessage());