mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Fix camel case device-id flag
This commit is contained in:
parent
109ce26780
commit
2016cf2a5f
2 changed files with 3 additions and 3 deletions
|
@ -142,7 +142,7 @@ Show a list of connected devices.
|
||||||
Remove a connected device.
|
Remove a connected device.
|
||||||
Only works, if this is the master 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.
|
Specify the device you want to remove.
|
||||||
Use listDevices to see the deviceIds.
|
Use listDevices to see the deviceIds.
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ public class RemoveDeviceCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
subparser.addArgument("-d", "--deviceId")
|
subparser.addArgument("-d", "--device-id", "--deviceId")
|
||||||
.type(int.class)
|
.type(int.class)
|
||||||
.required(true)
|
.required(true)
|
||||||
.help("Specify the device you want to remove. Use listDevices to see the deviceIds.");
|
.help("Specify the device you want to remove. Use listDevices to see the deviceIds.");
|
||||||
|
@ -22,7 +22,7 @@ public class RemoveDeviceCommand implements LocalCommand {
|
||||||
@Override
|
@Override
|
||||||
public void handleCommand(final Namespace ns, final Manager m) throws CommandException {
|
public void handleCommand(final Namespace ns, final Manager m) throws CommandException {
|
||||||
try {
|
try {
|
||||||
int deviceId = ns.getInt("deviceId");
|
int deviceId = ns.getInt("device-id");
|
||||||
m.removeLinkedDevices(deviceId);
|
m.removeLinkedDevices(deviceId);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new IOErrorException("Error while removing device: " + e.getMessage());
|
throw new IOErrorException("Error while removing device: " + e.getMessage());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue