From 2016cf2a5fdf83310d78ca1672a313884880f26e Mon Sep 17 00:00:00 2001 From: AsamK Date: Sun, 16 May 2021 16:11:55 +0200 Subject: [PATCH] Fix camel case device-id flag --- man/signal-cli.1.adoc | 2 +- .../java/org/asamk/signal/commands/RemoveDeviceCommand.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/man/signal-cli.1.adoc b/man/signal-cli.1.adoc index b9a7a9cb..ed498eaf 100644 --- a/man/signal-cli.1.adoc +++ b/man/signal-cli.1.adoc @@ -142,7 +142,7 @@ Show a list of connected devices. 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. diff --git a/src/main/java/org/asamk/signal/commands/RemoveDeviceCommand.java b/src/main/java/org/asamk/signal/commands/RemoveDeviceCommand.java index c9be92e8..6185cafc 100644 --- a/src/main/java/org/asamk/signal/commands/RemoveDeviceCommand.java +++ b/src/main/java/org/asamk/signal/commands/RemoveDeviceCommand.java @@ -13,7 +13,7 @@ public class RemoveDeviceCommand implements LocalCommand { @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."); @@ -22,7 +22,7 @@ public class RemoveDeviceCommand implements LocalCommand { @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()); -- 2.50.1