From 2d7a5d157bb806efd3cdebbfec0e4f48e09b64b4 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath <2+defunkt@users.noreply.github.com> Date: Tue, 7 Oct 2025 18:38:11 -0700 Subject: [PATCH] hide input --- src/js/commands.ts | 2 +- src/js/shell.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/commands.ts b/src/js/commands.ts index 1105058..30e7673 100644 --- a/src/js/commands.ts +++ b/src/js/commands.ts @@ -14,5 +14,5 @@ export function cacheCommands(cmds: Commands) { } export async function mode(mode?: string) { - await runCommand(mode ? `mode ${mode}` : "mode") + await runCommand(mode ? `mode ${mode}` : "mode", false) } \ No newline at end of file diff --git a/src/js/shell.ts b/src/js/shell.ts index e6a80de..8069888 100644 --- a/src/js/shell.ts +++ b/src/js/shell.ts @@ -8,7 +8,7 @@ import { randomId, importUrl } from "../shared/utils" import { addToHistory } from "./history" import { commands } from "./commands" -export async function runCommand(input: string) { +export async function runCommand(input: string, showInput = true) { if (!input.trim()) return if (input.includes(";")) { @@ -19,7 +19,8 @@ export async function runCommand(input: string) { const id = randomId() addToHistory(input) - addInput(id, input) + if (showInput) + addInput(id, input) const [cmd = "", ...args] = input.split(" ")