This commit is contained in:
2026-04-25 16:55:03 +08:00
parent 16a0a21a32
commit 975a585cf0
5 changed files with 1170 additions and 1 deletions

View File

@@ -171,6 +171,7 @@ set(USER_SHELL_COMMAND_APPS
diskinfo mkfsfat32 mount partctl
shutdown restart exit clear ansi ansitest wavplay fastfetch memstat fsstat taskstat userstat
shstat stats tty dmesg kbdstat mkdir touch write append cp mv rm kdbg bmpview qrcode browser
vim
)
foreach(SRC IN LISTS USER_APP_MAIN_SOURCES)

View File

@@ -15,6 +15,7 @@ static int ush_cmd_help(void) {
ush_writeln(" ansi / ansitest / color");
ush_writeln(" bmpview <file.bmp> [cols]");
ush_writeln(" qrcode [--ecc <L|M|Q|H>] <text>");
ush_writeln(" vim [file] (vim-like editor: normal/insert/:w/:q/:wq)");
ush_writeln(" wavplay <file.wav> [steps] [ticks] / wavplay --stop");
ush_writeln(" fastfetch [--plain]");
ush_writeln(" doom [wad_path] (framebuffer bootstrap renderer)");

View File

@@ -2460,6 +2460,18 @@ static int ush_execute_single_command(ush_state *sh, const char *cmd, const char
(void)allow_external;
/*
* Keep cd as a hard builtin so cwd updates never depend on
* external command context files.
*/
if (ush_streq(cmd, "cd") != 0) {
success = ush_cmd_cd(sh, arg);
if (out_success != (int *)0) {
*out_success = success;
}
return 1;
}
if (ush_try_exec_external(sh, cmd, arg, &success) != 0) {
if (out_success != (int *)0) {
*out_success = success;

1155
cleonos/c/apps/vim_main.c Normal file

File diff suppressed because it is too large Load Diff

2
clks

Submodule clks updated: 9097e6306b...3f70e14c55