Optimizing user commands to prevent conflicts (v1.0.4)

master
TitanE 10 months ago
parent e771a7e24a
commit a81c9bdf32

@ -187,8 +187,8 @@ print("\nkeyvault initialized.")
print("keyvault is ready to use! Type 'help' for a list of commands.\n") print("keyvault is ready to use! Type 'help' for a list of commands.\n")
while True: while True:
command = input("> ")[0].lower() command = input("> ")[0:2].lower()
if command == 'h': if command[0] == 'h':
print(""" print("""
Usage: Usage:
@ -204,22 +204,22 @@ version - print current version
quit - quit the program quit - quit the program
""") """)
elif command == 's' or command == 'f': elif command[0] == 's' or command[0] == 'f':
find() find()
elif command == 'l': elif command[0] == 'l':
ls() ls()
elif command == 'a': elif command[0] == 'a':
add() add()
elif command == 'r': elif command[0] == 'r':
rm() rm()
elif command == 'e': elif command == 'ed':
edit() edit()
elif command == 'v': elif command[0] == 'v':
print("keyvault: v1.0.3") print("keyvault: v1.0.4")
elif command == 'g': elif command[0] == 'g':
gen() gen()
elif command == 's': elif command[0] == 's':
strength() strength()
elif command == 'q': elif command[0] == 'q' or command == 'ex':
print("Thank for you using keyvault!") print("Thank for you using keyvault!")
exit() exit()

Loading…
Cancel
Save