Skip to content

Commit 996b6ea

Browse files
mikkoioalders
authored andcommitted
Simplify regex
1 parent f88a466 commit 996b6ea

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

script/mech-dump

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ sub completions {
4949
my (@words) = @_;
5050
my @opts;
5151
foreach ( sort keys %command_line_options ) {
52-
if (m/^ (?<opt> [^!]{1,}) ! $/msx) {
52+
if (m/^ (?<opt> [^!]+) ! $/msx) {
5353
push @opts, $+{opt}, 'no-' . $+{opt};
5454
}
55-
elsif (m/^ (?<opt> [^=]{1,}) = [siof]{1} $/msx) {
55+
elsif (m/^ (?<opt> [^=]+) = [siof]{1} $/msx) {
5656
push @opts, ( split qr{\|}, $+{opt} );
5757
}
5858
else {

0 commit comments

Comments
 (0)