Skip to content

Commit 3b634b0

Browse files
committed
Add shortcut flags and update usage
1 parent 62d8662 commit 3b634b0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tinytuya/__main__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
state = 0
3939
elif i.lower() == "-nocolor":
4040
color = False
41-
elif i.lower() == "-force":
41+
elif i.lower() == "-force" or i.lower() == "-f":
4242
force = True
4343
this_force = True
4444
elif i.lower() == "-no-broadcasts":
@@ -49,9 +49,9 @@
4949
state = 3
5050
elif i.lower() == "json":
5151
state = 4
52-
elif i.lower() == "-yes":
52+
elif i.lower() == "-yes" or i.lower() == "-y":
5353
assume_yes = True
54-
elif i.lower() == "-debug":
54+
elif i.lower() == "-debug" or i.lower() == "-d":
5555
tinytuya.set_debug(True)
5656
elif last_force and len(i) > 6:
5757
this_force = True
@@ -100,8 +100,8 @@
100100
print(" json Scan devices listed in snapshot.json file [JSON].")
101101
print(" <max_time> Maximum time to find Tuya devices [Default=%s]" % tinytuya.SCANTIME)
102102
print(" -nocolor Disable color text output.")
103-
print(" -force Force network scan for device IP addresses. Auto-detects network range if none provided.")
104-
print(" [net1/mask1 net2/mask2 ...]")
103+
print(" -force Force network scan of device IP addresses based on format:")
104+
print(" [net1/mask1 net2/mask2 ...] Auto-detects if none provided.")
105105
print(" -no-broadcasts Ignore broadcast packets when force scanning.")
106106
print(" -debug Activate debug mode.")
107107
print(" -h Show usage.")

0 commit comments

Comments
 (0)