Shell: only its own replies, Apps by their names, and rm as Unix has it (#67)
CI / build (pull_request) Successful in 1m38s
Site / build (pull_request) Successful in 10s

The Shell shows the replies to its own commands and nothing else. The
console knows who each line is printed for (Console::As, Console::origin):
a command run from the Shell prints as the Shell's, and what answers it
later from another task carries that along (ls, tasks, du, cp, update
check, sd list, screenshot, gemini get). Ctrl+b shows everything instead.
This replaces the ten-second window, which was a guess.

An App's name with a capital opens it (Notes, Irc, Wifi, Gnss, Gemini, Lora,
Storage, Shell, System, Settings), from the Shell and from the consoles.

rm needs -r for a folder, here and over the consoles. In the Shell a file,
or a folder with something in it, is asked about unless -f; an empty folder
with -r goes without a word.

The Shell now hands its line to the main loop to run: run from inside the
key handler, rm on a folder overflowed the loop's stack and crashed the
device. `info` says which App is in front.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
2026-10-07 11:35:29 +02:00
co-authored by Claude Opus 5.5
parent 3863d28593
commit 7b5df713ad
24 changed files with 414 additions and 124 deletions
@@ -260,6 +260,19 @@ void test_the_help_panel_scrolls_within_its_rows() {
TEST_ASSERT_EQUAL(0, m.rows().size());
}
// Issue #67: an App is opened by its name with a capital letter.
void test_an_app_command_is_its_id_with_a_capital() {
TEST_ASSERT_EQUAL_STRING("Notes", AppManager::commandFor("notes").c_str());
TEST_ASSERT_EQUAL_STRING("Wifi", AppManager::commandFor("wifi-tools").c_str());
TEST_ASSERT_EQUAL_STRING("Irc", AppManager::commandFor("irc").c_str());
Fixture f;
TEST_ASSERT_NOT_NULL(f.manager.byCommand("Notes"));
TEST_ASSERT_EQUAL_STRING("notes", f.manager.byCommand("Notes")->id);
TEST_ASSERT_NULL(f.manager.byCommand("notes")); // small letters are commands, not Apps
TEST_ASSERT_NULL(f.manager.byCommand("Demo")); // hidden: not in the Launcher, not here
TEST_ASSERT_NULL(f.manager.byCommand("Nope"));
}
int main() {
UNITY_BEGIN();
RUN_TEST(test_launcher_is_in_foreground_after_begin);
@@ -283,5 +296,6 @@ int main() {
RUN_TEST(test_open_help_takes_every_key_and_any_but_the_arrows_closes_it);
RUN_TEST(test_help_works_in_a_modal_app_and_closes_when_the_app_changes);
RUN_TEST(test_the_help_panel_scrolls_within_its_rows);
RUN_TEST(test_an_app_command_is_its_id_with_a_capital);
return UNITY_END();
}