From: AsamK Date: Sun, 16 May 2021 14:11:55 +0000 (+0200) Subject: Fix camel case device-id flag X-Git-Tag: v0.8.4~28 X-Git-Url: https://git.nmode.ca/signal-cli/commitdiff_plain/2016cf2a5fdf83310d78ca1672a313884880f26e?ds=sidebyside Fix camel case device-id flag --- 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());