Skip to content

Evaluate the channel name as a regex#14

Open
oliwer wants to merge 2 commits intorockymadden:masterfrom
oliwer:regex
Open

Evaluate the channel name as a regex#14
oliwer wants to merge 2 commits intorockymadden:masterfrom
oliwer:regex

Conversation

@oliwer
Copy link

@oliwer oliwer commented Aug 19, 2019

This allows the user to write somafm listen groove instead of somafm listen groovesalad. It's very convenient. The regex forces the user to write the first letters of the channel, it cannot match
the middle or the end. This is voluntary and should help avoiding unexpected results.

This allows the user to write `somafm listen groove` instead of
`somafm listen groovesalad`. It's very convenient. The regex forces
the user to write the first letters of the channel, it cannot match
the middle or the end. This is voluntary and should help avoiding
unexpected results.
@rockymadden
Copy link
Owner

@oliwer Love it. Are there any instances where a channel name is the prefix of another? I can't think of one off hand.

This guaranties we get the right result in case a channel name
is the same as another channel prefix. Also limit the number
of results to 1.
@oliwer
Copy link
Author

oliwer commented Aug 20, 2019

You're right. There is little chance this may ever happen, but I modified the condition to make sure it never happens!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants