mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-01 10:57:33 +01:00
25 lines
694 B
TypeScript
25 lines
694 B
TypeScript
import { ITerminal } from "../ITerminal";
|
|
import { IRouter } from "../../ui/Router";
|
|
import { IPlayer } from "../../PersonObjects/IPlayer";
|
|
import { BaseServer } from "../../Server/BaseServer";
|
|
import { removeAlias } from "../../Alias";
|
|
|
|
export function unalias(
|
|
terminal: ITerminal,
|
|
router: IRouter,
|
|
player: IPlayer,
|
|
server: BaseServer,
|
|
args: (string | number | boolean)[],
|
|
): void {
|
|
if (args.length !== 1) {
|
|
terminal.error("Incorrect usage of unalias name. Usage: unalias [alias]");
|
|
return;
|
|
} else {
|
|
if (removeAlias(args[0] + "")) {
|
|
terminal.print(`Removed alias ${args[0]}`);
|
|
} else {
|
|
terminal.error(`No such alias exists: ${args[0]}`);
|
|
}
|
|
}
|
|
}
|