mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 11:27:04 +02:00
BUGFIX: Tab completion uses wrong command list (#1537)
This commit is contained in:
@@ -11,50 +11,7 @@ import libarg from "arg";
|
||||
import { getAllDirectories, resolveDirectory, root } from "../Paths/Directory";
|
||||
import { isLegacyScript, resolveScriptFilePath } from "../Paths/ScriptFilePath";
|
||||
import { enums } from "../NetscriptFunctions";
|
||||
|
||||
// TODO: this shouldn't be hardcoded in two places with no typechecks to verify equivalence
|
||||
// An array of all Terminal commands
|
||||
const gameCommands = [
|
||||
"alias",
|
||||
"analyze",
|
||||
"backdoor",
|
||||
"cat",
|
||||
"cd",
|
||||
"changelog",
|
||||
"check",
|
||||
"clear",
|
||||
"cls",
|
||||
"connect",
|
||||
"cp",
|
||||
"download",
|
||||
"expr",
|
||||
"free",
|
||||
"grow",
|
||||
"hack",
|
||||
"help",
|
||||
"home",
|
||||
"hostname",
|
||||
"ifconfig",
|
||||
"kill",
|
||||
"killall",
|
||||
"ls",
|
||||
"lscpu",
|
||||
"mem",
|
||||
"mv",
|
||||
"nano",
|
||||
"ps",
|
||||
"rm",
|
||||
"run",
|
||||
"scan-analyze",
|
||||
"scan",
|
||||
"scp",
|
||||
"sudov",
|
||||
"tail",
|
||||
"theme",
|
||||
"top",
|
||||
"vim",
|
||||
"weaken",
|
||||
];
|
||||
import { TerminalCommands } from "./Terminal";
|
||||
|
||||
/** Suggest all completion possibilities for the last argument in the last command being typed
|
||||
* @param terminalText The current full text entered in the terminal
|
||||
@@ -123,7 +80,7 @@ export async function getTabCompletionPossibilities(terminalText: string, baseDi
|
||||
|
||||
const addAliases = () => addGeneric({ iterable: Aliases.keys() });
|
||||
const addGlobalAliases = () => addGeneric({ iterable: GlobalAliases.keys() });
|
||||
const addCommands = () => addGeneric({ iterable: gameCommands });
|
||||
const addCommands = () => addGeneric({ iterable: Object.keys(TerminalCommands) });
|
||||
const addDarkwebItems = () => addGeneric({ iterable: Object.values(DarkWebItems).map((item) => item.program) });
|
||||
const addServerNames = () =>
|
||||
addGeneric({
|
||||
|
||||
Reference in New Issue
Block a user