diff --git a/src/userland/shell/main.c b/src/userland/shell/main.c index d74fa74..164136a 100644 --- a/src/userland/shell/main.c +++ b/src/userland/shell/main.c @@ -8,9 +8,19 @@ while (1) { printf("> "); gets(buffer); - if (!*buffer) { + if (!*buffer || *buffer == ' ') { continue; } + uint32_t space_position = strlen(buffer); + for (uint32_t i = 0; buffer[i]; i++) { + if (buffer[i] == ' ') { + space_position = i; + break; + } + } + buffer[space_position] = 0; + char *command = buffer; + char *arguments = buffer + space_position + 1; uint32_t service = getService(buffer); if (!service) { service = loadFromInitrdUninitialized(buffer);