package solutions.tretter.githugandroid object GitSandboxEngine { data class ShellToken( val value: String, val quoted: Boolean = false, ) fun commandReferenceLines(): List = listOf( "Available sandbox commands:", " git ", " ls|dir", " touch ", " help", " pwd ", " cat ", " touch ", " mkdir|md ", " cd ", " cd..", " rm|del ", " echo ", ) fun execute(repo: RepoState, command: String): Pair> { val shellParts = tokenizeShellCommand(command) if (shellParts.isEmpty()) return repo to emptyList() return SandboxCommandEngine.execute(repo, shellParts) } fun tokenizeCommand(command: String): List { return SandboxShell.tokenizeCommand(command) } fun tokenizeShellCommand(command: String): List { return SandboxShell.tokenizeShellCommand(command) } fun expandPathspecs(repo: RepoState, arguments: List): List { return SandboxShell.expandPathspecs(repo, arguments) } fun expandPathspecTokens(repo: RepoState, arguments: List): List { return SandboxShell.expandPathspecTokens(repo, arguments) } }