mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
MISC: Add raw command string to autocomplete data (#1846)
This commit is contained in:
15
markdown/bitburner.autocompletedata.command.md
Normal file
15
markdown/bitburner.autocompletedata.command.md
Normal file
@@ -0,0 +1,15 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [AutocompleteData](./bitburner.autocompletedata.md) > [command](./bitburner.autocompletedata.command.md)
|
||||
|
||||
## AutocompleteData.command property
|
||||
|
||||
The raw command string that you have typed until you press \[Tab\] to use the autocomplete feature.
|
||||
|
||||
For example, if you type `[Space]run test.js[Space][Space][Space][Press tab to use autocomplete]`<!-- -->, "command" will contain all space characters (1 space character before "run" and 3 space characters after ".js").
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
command: string;
|
||||
```
|
||||
@@ -16,6 +16,7 @@ interface AutocompleteData
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [command](./bitburner.autocompletedata.command.md) | | string | <p>The raw command string that you have typed until you press \[Tab\] to use the autocomplete feature.</p><p>For example, if you type <code>[Space]run test.js[Space][Space][Space][Press tab to use autocomplete]</code>, "command" will contain all space characters (1 space character before "run" and 3 space characters after ".js").</p> |
|
||||
| [enums](./bitburner.autocompletedata.enums.md) | | [NSEnums](./bitburner.nsenums.md) | Netscript Enums |
|
||||
| [filename](./bitburner.autocompletedata.filename.md) | | string | The filename of the script about to be run |
|
||||
| [hostname](./bitburner.autocompletedata.hostname.md) | | string | The hostname of the server the script would be running on |
|
||||
|
||||
7
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
7
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -9671,6 +9671,13 @@ interface AutocompleteData {
|
||||
filename: string;
|
||||
/** The processes running on the host */
|
||||
processes: ProcessInfo[];
|
||||
/**
|
||||
* The raw command string that you have typed until you press [Tab] to use the autocomplete feature.
|
||||
*
|
||||
* For example, if you type `[Space]run test.js[Space][Space][Space][Press tab to use autocomplete]`, "command" will
|
||||
* contain all space characters (1 space character before "run" and 3 space characters after ".js").
|
||||
*/
|
||||
command: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -324,6 +324,7 @@ export async function getTabCompletionPossibilities(terminalText: string, baseDi
|
||||
temporary: r.temporary,
|
||||
})),
|
||||
).flat(),
|
||||
command: terminalText,
|
||||
};
|
||||
let pos: string[] = [];
|
||||
let pos2: string[] = [];
|
||||
|
||||
Reference in New Issue
Block a user