Skip to content

Commit 81fe227

Browse files
committed
Make notable commands same as var reset keywords
Nobody remembers them anyway, so it's better to accept any word consistently.
1 parent 5f9bcf1 commit 81fe227

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/Notable.p6

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,13 @@ multi method irc-to-me($msg where
6060
}
6161

6262
my &clearish = {
63+
my @clear-commands = <clear reset delete default>;
6364
do if .args[1].starts-with: @shortcuts.any ~ : {
64-
m/^ \s* [clear|reset|delete] \s* $/
65+
m/^ \s* @clear-commands \s* $/
6566
} else {
66-
m/^ \s* [clear|reset|delete] \s+ <topic> \s* $/
67+
m/^ \s* @clear-commands \s+ <topic> \s* $/
6768
||
68-
m/^ \s* <topic> \s+ [clear|reset|delete] \s* $/
69+
m/^ \s* <topic> \s+ @clear-commands \s* $/
6970
}
7071
}
7172
multi method irc-to-me($msg where &clearish) {

0 commit comments

Comments
 (0)