From a02aab3b20c55a0cf420e09b446364840f9357fa Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Mon, 9 Feb 2026 21:56:53 +0800 Subject: [PATCH] =?UTF-8?q?&&=E8=AF=AD=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GitCommit.txt | 2 +- shell/Shell.cs | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/GitCommit.txt b/GitCommit.txt index 4286705..d0cf643 100644 --- a/GitCommit.txt +++ b/GitCommit.txt @@ -1 +1 @@ -d7b60fa \ No newline at end of file +a7bf977 \ No newline at end of file diff --git a/shell/Shell.cs b/shell/Shell.cs index dcdfcc9..ae821b5 100644 --- a/shell/Shell.cs +++ b/shell/Shell.cs @@ -113,12 +113,17 @@ namespace CMLeonOS } commandHistory.Add(input); - var parts = input.Split(' ', StringSplitOptions.RemoveEmptyEntries); - if (parts.Length > 0) + var commands = input.Split(new string[] { "&&" }, StringSplitOptions.RemoveEmptyEntries); + + foreach (var cmd in commands) { - var command = parts[0].ToLower(); - var args = parts.Length > 1 ? string.Join(" ", parts, 1, parts.Length - 1) : ""; - ProcessCommand(command, args); + var parts = cmd.Split(' ', StringSplitOptions.RemoveEmptyEntries); + if (parts.Length > 0) + { + var command = parts[0].Trim().ToLower(); + var args = parts.Length > 1 ? string.Join(" ", parts, 1, parts.Length - 1).Trim() : ""; + ProcessCommand(command, args); + } } // 如果需要退出,返回到登录页面