mash/main.py!
2024-07-03 12:38:20 +10:00

21 lines
505 B
Plaintext

import os
import subprocess
initDirectory = os.path.dirname(os.path.realpath(__file__))
currentDirectory = initDirectory
version = "0.0.1"
def grabArgument(fullCommand, commandRan):
fullCommand.replace(commandRan, "")
while True:
command = input(currentDirectory + " > ")
if command == "pwd":
print(currentDirectory)
elif command == ("cat", *):
grabArgument(command, cat )
elif command == "version":
print(version)
else:
subprocess.run(command)