diff --git a/sys/teton/terminal.cpp b/sys/teton/terminal.cpp index c1215a6..a22ee99 100644 --- a/sys/teton/terminal.cpp +++ b/sys/teton/terminal.cpp @@ -14,7 +14,13 @@ void Terminal::HandleCharacter(char c) { } void Terminal::ExecuteCommand(const glcr::String& command) { - console_.WriteString("Executing: "); - console_.WriteString(command); - console_.WriteString("\n>"); + if (command == "cwd") { + console_.WriteString(cwd_); + console_.WriteChar('\n'); + } else { + console_.WriteString("Unknown command: "); + console_.WriteString(command); + console_.WriteChar('\n'); + } + console_.WriteChar('>'); } diff --git a/sys/teton/terminal.h b/sys/teton/terminal.h index 3628141..71408a2 100644 --- a/sys/teton/terminal.h +++ b/sys/teton/terminal.h @@ -14,4 +14,6 @@ class Terminal : public mmth::KeyboardListenerBase { private: Console& console_; glcr::VariableStringBuilder current_command_; + + glcr::String cwd_ = "/"; };