Add os.py
This commit is contained in:
commit
e07ce515f7
|
@ -0,0 +1,27 @@
|
||||||
|
print("[AutoLogin] Logged into user root")
|
||||||
|
def hello():
|
||||||
|
print("Hello! You've activated the hello command.")
|
||||||
|
|
||||||
|
def help_command():
|
||||||
|
print("This is the help command. Use --help for assistance.")
|
||||||
|
|
||||||
|
def custom_terminal():
|
||||||
|
commands = {
|
||||||
|
"hello": hello,
|
||||||
|
"help": help_command,
|
||||||
|
}
|
||||||
|
|
||||||
|
print("Welcome to your custom terminal! Type 'exit' to quit.")
|
||||||
|
|
||||||
|
while True:
|
||||||
|
command = input("$ ").strip()
|
||||||
|
|
||||||
|
if command == "exit":
|
||||||
|
break
|
||||||
|
elif command in commands:
|
||||||
|
commands[command]()
|
||||||
|
else:
|
||||||
|
print(f"Unknown command: {command}")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
custom_terminal()
|
Loading…
Reference in New Issue