14 lines
322 B
TypeScript
14 lines
322 B
TypeScript
import { IShellCommand } from "./IShellCommand";
|
|
|
|
export class echo implements IShellCommand {
|
|
getName(): string {
|
|
return 'echo';
|
|
}
|
|
|
|
execute(input: string | string[]): string {
|
|
if (Array.isArray(input)) {
|
|
return input.join(' ').trim();
|
|
}
|
|
return input.trim();
|
|
}
|
|
} |