The dash has a special behavior because the argument to hs.screen.find is interpreted as a Lua pattern, not a plain string. In Lua pattern syntax, the dash means "zero or more".
- a string pattern that matches (via
string.match) the screen name as per hs.screen:name() (for convenience, the matching will be done on lowercased strings)
Your patch changes the semantics of the match by enabling the "plain text" argument to string.find. I don't think this is a good idea, but if accepted, this needs to at least be documented. I find it more useful to accept patterns.
--Diego