mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-09 17:23:53 +01:00
parent
21b04bdec0
commit
4560fb7250
@ -76,6 +76,7 @@ export function substituteAliases(origCommand: string): string {
|
||||
|
||||
let somethingSubstituted = true;
|
||||
let depth = 0;
|
||||
let lastAlias;
|
||||
|
||||
while (somethingSubstituted && depth < 10) {
|
||||
depth++;
|
||||
@ -88,8 +89,9 @@ export function substituteAliases(origCommand: string): string {
|
||||
}
|
||||
for (let i = 0; i < commandArray.length; ++i) {
|
||||
const alias = GlobalAliases.get(commandArray[i])?.split(" ");
|
||||
if (alias !== undefined) {
|
||||
if (alias !== undefined && (commandArray[i] != lastAlias || somethingSubstituted)) {
|
||||
somethingSubstituted = true;
|
||||
lastAlias = commandArray[i];
|
||||
commandArray.splice(i, 1, ...alias);
|
||||
i += alias.length - 1;
|
||||
//commandArray[i] = alias;
|
||||
|
Loading…
Reference in New Issue
Block a user