mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
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:
parent
790ffeb8a1
commit
1f6954b393
@ -36,7 +36,7 @@ export function printAliases(): void {
|
|||||||
|
|
||||||
// Returns true if successful, false otherwise
|
// Returns true if successful, false otherwise
|
||||||
export function parseAliasDeclaration(dec: string, global = false): boolean {
|
export function parseAliasDeclaration(dec: string, global = false): boolean {
|
||||||
const re = /^([_|\w|!|%|,|@]+)="(.+)"$/;
|
const re = /^([\w|!|%|,|@|-]+)="(.+)"$/;
|
||||||
const matches = dec.match(re);
|
const matches = dec.match(re);
|
||||||
if (matches == null || matches.length != 3) {
|
if (matches == null || matches.length != 3) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user