few more CLI tweaks
This commit is contained in:
parent
2cbf80f293
commit
9d6d68efc1
@ -65,7 +65,7 @@ class UGV_CLI:
|
|||||||
print("{}: {}".format(names, cmd.description))
|
print("{}: {}".format(names, cmd.description))
|
||||||
print()
|
print()
|
||||||
|
|
||||||
@cli_cmd(names=["exit", "q"], description="Quit the program")
|
@cli_cmd(names=["exit", "q", "C-d", "C-c"], description="Quit the program")
|
||||||
def exit(self):
|
def exit(self):
|
||||||
self.is_running = False
|
self.is_running = False
|
||||||
|
|
||||||
@ -149,6 +149,7 @@ class UGV_CLI:
|
|||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
last_line = None
|
last_line = None
|
||||||
try:
|
try:
|
||||||
|
print("Run 'help' to find out what commands are available")
|
||||||
while self.is_running:
|
while self.is_running:
|
||||||
line = input("UGV> ")
|
line = input("UGV> ")
|
||||||
if len(line) is 0 and last_line is not None:
|
if len(line) is 0 and last_line is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user