]> nmode's Git Repositories - signal-cli/commitdiff
Fix camel case device-id flag
authorAsamK <asamk@gmx.de>
Sun, 16 May 2021 14:11:55 +0000 (16:11 +0200)
committerAsamK <asamk@gmx.de>
Sun, 16 May 2021 14:11:55 +0000 (16:11 +0200)
man/signal-cli.1.adoc
src/main/java/org/asamk/signal/commands/RemoveDeviceCommand.java

index b9a7a9cb936d8cda0d60b08363b767d841926096..ed498eaf417bdeb6deaa37fdb6d390f84b6cd646 100644 (file)
@@ -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.
 
index c9be92e8628c46a64baf005bfa7c788d588f8860..6185cafce931a66ab1e06606c90c6275b87e67c6 100644 (file)
@@ -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());