From 7a0fdb9ce94c4a9c3432821f3360f15d7123e53f Mon Sep 17 00:00:00 2001 From: FaintSpeaker Date: Wed, 29 Dec 2021 13:56:26 -0500 Subject: [PATCH] This regular expression expects 7 potential matches. 1: The whole string 2: the alias name 3 & 4: the command text in two locations 5 & 6: the quoted command text in two styles 7: the group that selects between the two qoted styles. --- src/Alias.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Alias.ts b/src/Alias.ts index 238c531e0..bdf0315c6 100644 --- a/src/Alias.ts +++ b/src/Alias.ts @@ -38,7 +38,7 @@ export function printAliases(): void { export function parseAliasDeclaration(dec: string, global = false): boolean { const re = /^([\w|!|%|,|@|-]+)=(("(.+)")|('(.+)'))$/; const matches = dec.match(re); - if (matches == null || matches.length != 3) { + if (matches == null || matches.length != 7) { return false; } if (global) {