hide input
This commit is contained in:
parent
9ddc36e014
commit
2d7a5d157b
|
|
@ -14,5 +14,5 @@ export function cacheCommands(cmds: Commands) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function mode(mode?: string) {
|
export async function mode(mode?: string) {
|
||||||
await runCommand(mode ? `mode ${mode}` : "mode")
|
await runCommand(mode ? `mode ${mode}` : "mode", false)
|
||||||
}
|
}
|
||||||
|
|
@ -8,7 +8,7 @@ import { randomId, importUrl } from "../shared/utils"
|
||||||
import { addToHistory } from "./history"
|
import { addToHistory } from "./history"
|
||||||
import { commands } from "./commands"
|
import { commands } from "./commands"
|
||||||
|
|
||||||
export async function runCommand(input: string) {
|
export async function runCommand(input: string, showInput = true) {
|
||||||
if (!input.trim()) return
|
if (!input.trim()) return
|
||||||
|
|
||||||
if (input.includes(";")) {
|
if (input.includes(";")) {
|
||||||
|
|
@ -19,7 +19,8 @@ export async function runCommand(input: string) {
|
||||||
const id = randomId()
|
const id = randomId()
|
||||||
|
|
||||||
addToHistory(input)
|
addToHistory(input)
|
||||||
addInput(id, input)
|
if (showInput)
|
||||||
|
addInput(id, input)
|
||||||
|
|
||||||
const [cmd = "", ...args] = input.split(" ")
|
const [cmd = "", ...args] = input.split(" ")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user