Spaces:
Sleeping
Sleeping
File size: 1,003 Bytes
8d9eecc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
from display import clear_and_setup, get_colored_prompt
from builtin_commands import handle_builtin_commands
from external_commands import run_external_command
from colors import *
def main():
clear_and_setup()
while True:
try:
prompt = get_colored_prompt()
line = input(prompt).strip()
if not line:
continue
if line.lower() == "exit":
print(f"{YELLOW}👋 Goodbye from AcidopShell!{RESET}")
break
command_parts = line.split()
if handle_builtin_commands(command_parts):
continue
run_external_command(command_parts)
except KeyboardInterrupt:
print(f"\n{YELLOW}💡 Use 'exit' to quit Codic !{RESET}")
except EOFError:
print(f"\n{YELLOW}👋 Goodbye from Codic !{RESET}")
break
if __name__ == "__main__":
main()
|