From c64b923f0de256f36aac64cb38df38a6aeaceacc Mon Sep 17 00:00:00 2001 From: TitanE Date: Tue, 16 Jan 2024 12:28:18 +0300 Subject: [PATCH] Version 1.0.1: 1. Adjusts for spelling mistakes in commands 2. Readjusted help query based on importance --- keyvault.py | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/keyvault.py b/keyvault.py index fac73b7..86065ce 100644 --- a/keyvault.py +++ b/keyvault.py @@ -189,25 +189,39 @@ print("\nkeyvault initialized.") print("keyvault is ready to use! Type 'help' for a list of commands.\n") while True: - command = input("> ").lower() - if command == 'help': - print("\nUsage:\n\nadd - add an entry\nls - list entires\nrm - remove entry\ngen - generate a password or username\nstrength - check password strength\nedit - edit an entry\nfind/search - open search wizard\nhelp - display this message\nversion - print current version\n") - elif command == 'search' or command == 'find': + command = input("> ")[0].lower() + if command == 'h': + print(""" +Usage: + +add - add an entry +ls - list entires +edit - edit an entry +find/search - open search wizard +rm - remove entry +gen - generate a password or username +strength - check password strength +help - display this message +version - print current version +quit - quit the program + + """) + elif command == 's' or command == 'f': find() - elif command == 'ls': + elif command == 'l': ls() - elif command == 'add': + elif command == 'a': add() - elif command == 'rm': + elif command == 'r': rm() - elif command == 'edit': + elif command == 'e': edit() - elif command == 'version': - print("keyvault: v1.0.0") - elif command == 'gen': + elif command == 'v': + print("keyvault: v1.0.1") + elif command == 'g': gen() - elif command == 'strength': + elif command == 's': strength() - elif command == 'exit': + elif command == 'q': print("Thank for you using keyvault!") exit()