Merge pull request #2007 from hexnaught/alias-hyphen-allowed-patch

Allow hyphens in command aliases
This commit is contained in:
hydroflame 2021-12-19 00:28:11 -05:00 committed by GitHub
commit 24f0c9e65d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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