From 1f6954b393fb84fc34f096befd92eaf080a4b5a6 Mon Sep 17 00:00:00 2001 From: Dan Date: Sun, 19 Dec 2021 02:09:47 +0000 Subject: [PATCH] fix(command:alias) allow hyphen in aliases - Allow hyphens in aliases - Remove redundant underscore, covered by '\w' Resolves danielyxie/bitburner#2000 --- src/Alias.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Alias.ts b/src/Alias.ts index 73029f69b..b80aed6a3 100644 --- a/src/Alias.ts +++ b/src/Alias.ts @@ -36,7 +36,7 @@ export function printAliases(): void { // Returns true if successful, false otherwise export function parseAliasDeclaration(dec: string, global = false): boolean { - const re = /^([_|\w|!|%|,|@]+)="(.+)"$/; + const re = /^([\w|!|%|,|@|-]+)="(.+)"$/; const matches = dec.match(re); if (matches == null || matches.length != 3) { return false;