From 1ccf01bfc0f8bc6efbb7a469e7b942e23d95f06e Mon Sep 17 00:00:00 2001 From: mattpass Date: Fri, 23 Oct 2020 11:13:23 +0100 Subject: [PATCH] No need to double output prompt if no arg for cd --- lib/terminal-xhr.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/terminal-xhr.php b/lib/terminal-xhr.php index c7e7bae..4f8a09a 100644 --- a/lib/terminal-xhr.php +++ b/lib/terminal-xhr.php @@ -76,7 +76,6 @@ $output = returnHTMLPromptCommand($_REQUEST['command']); // If command contains cd but no dir if (preg_match('/^[[:blank:]]*cd[[:blank:]]*$/', $_REQUEST['command'])) { $_SESSION['cwd'] = $cwd; - $output .= returnHTMLPromptCommand("cd"); // Else cd to a dir } elseif (preg_match('/^[[:blank:]]*cd[[:blank:]]+([^;]+)$/', $_REQUEST['command'], $regs)) { // The current command is 'cd', which we have to handle as an internal shell command