the inbuilt terminal kinda works now, .gitignore files also have syntax highlighting now

This commit is contained in:
SpookyDervish
2025-10-26 13:23:47 +11:00
parent 6af08dece4
commit ff6e6cc788
2 changed files with 10 additions and 1 deletions

View File

@@ -51,9 +51,17 @@ class Berry(App):
yield Footer()
def on_input_submitted(self, event: Input.Submitted):
if event.input.id != "console-input":
return
self.run_command(event.input.value)
event.input.clear()
def run_command(self, command: str):
console = self.query_one("#console")
console.write(f"> {command}")
result = subprocess.check_output(command, shell=True, text=True)
console.write(result)