16 lines
649 B
TypeScript
16 lines
649 B
TypeScript
import { GetCurrentTerminal, WEBSHELL_VERSION } from '../app'
|
|
import type { Item } from '../fs/Item'
|
|
import { Terminal } from '../terminal/Terminal'
|
|
import type { SimpleStream } from '../utils/SimpleStream'
|
|
import { Program } from './Program'
|
|
|
|
export class Info extends Program {
|
|
async Exec(_: SimpleStream<string>, stdout: SimpleStream<string>, __: Item, ___: string[]): Promise<number> {
|
|
stdout.emit(`Webshell v${WEBSHELL_VERSION}\n`)
|
|
stdout.emit(`Terminal v${Terminal.Version}\n`)
|
|
stdout.emit(`Running ${GetCurrentTerminal().GetShell()?.Name} v${GetCurrentTerminal().GetShell()?.Version}\n`)
|
|
|
|
return 0
|
|
}
|
|
}
|