QUICKFIX: Issue #630 (#635)

This commit is contained in:
Nils Ramstöck 2023-06-21 01:00:06 +02:00 committed by GitHub
parent 21b04bdec0
commit 4560fb7250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;