fix(command:alias) allow hyphen in aliases

- Allow hyphens in aliases
- Remove redundant underscore, covered by '\w'

Resolves danielyxie/bitburner#2000
This commit is contained in:
Dan 2021-12-19 02:09:47 +00:00
parent 790ffeb8a1
commit 1f6954b393
No known key found for this signature in database
GPG Key ID: CD0F515DA7B576B5

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