mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-29 19:13:49 +01:00
Add autocomplete to help command
This commit is contained in:
parent
62ac7f7d17
commit
d136198738
@ -6,6 +6,7 @@ import { DarkWebItems } from "../DarkWeb/DarkWebItems";
|
||||
import { IPlayer } from "../PersonObjects/IPlayer";
|
||||
import { GetServer, GetAllServers } from "../Server/AllServers";
|
||||
import { ParseCommand, ParseCommands } from "./Parser";
|
||||
import { HelpTexts } from "./HelpText";
|
||||
import { isScriptFilename } from "../Script/isScriptFilename";
|
||||
import { compile } from "../NetscriptJSEvaluator";
|
||||
import { Flags } from "../NetscriptFunctions/Flags";
|
||||
@ -396,5 +397,11 @@ export async function determineAllPossibilitiesForTabCompletion(
|
||||
addAllDirectories();
|
||||
}
|
||||
|
||||
if (isCommand("help")) {
|
||||
// Get names from here instead of commands array because some
|
||||
// undocumented/nonexistent commands are in the array
|
||||
return Object.keys(HelpTexts);
|
||||
}
|
||||
|
||||
return allPos;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user