Add help
This commit is contained in:
parent
6425a3f20b
commit
498795d69d
17
main.py
17
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] == "/":
|
||||
|
|
Loading…
Reference in New Issue
Block a user