From 498795d69dd4cd46f599e10a0650899604567bec Mon Sep 17 00:00:00 2001 From: max Date: Wed, 3 Jul 2024 14:46:40 +1000 Subject: [PATCH] Add help --- main.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 524d84f..dbac5c5 100755 --- a/main.py +++ b/main.py @@ -15,11 +15,22 @@ def grabArgument(fullCommand, commandRan): try: while True: command = input(currentDirectory + " > ") - if command == "pwd": + if command == "help": + print("This is Mash, Max's Shell. Mash has a few built in commands, which you can use to run commands, view files and interact with your system.") + print("Some commands you can run:") + print("") + print("pwd Print directory you are currently in") + print("cd Change your directory.") + print("cat View contents of a file.") + print("version Print current version of Mash.") + print("exit Exit Mash.") + print("") + print("You can also run commands installed by your system. See your OS's documentation for more information.") + elif command == "pwd": print(currentDirectory) - if command == "exit": + elif command == "exit": exit() - if command == "cd": + elif command == "cd": try: cdDirectory = input("Directory: ") if cdDirectory[0] == "/":