Add del alias for rm helper command

This commit is contained in:
Joe Tretter
2026-05-05 20:12:08 -05:00
parent b8c4096123
commit 5c7c7ad29d
4 changed files with 20 additions and 7 deletions

View File

@@ -104,7 +104,7 @@ object GitSandboxEngine {
" mkdir|md <directory>",
" cd <directory>",
" cd..",
" rm <file>",
" rm|del <file>",
" echo <message>",
)
@@ -119,7 +119,7 @@ object GitSandboxEngine {
else repo.copy(files = repo.files + GitFile(name = name)) to emptyList()
}
(parts[0] == "mkdir" || parts[0] == "md") && parts.size >= 2 -> repo to emptyList()
parts[0] == "rm" && parts.size >= 2 -> {
(parts[0] == "rm" || parts[0] == "del") && parts.size >= 2 -> {
val target = parts[1]
repo.copy(files = repo.files.mapNotNull { file ->
when {