- if c.cmd == 'has' or c.cmd == 'matches': # string test
- regexp = (c.cmd == 'matches')
- if len(c.args) == 1 and not regexp: # @has <path> = file existence
+ if c.cmd in ['has', 'hasraw', 'matches', 'matchesraw']: # string test
+ regexp = c.cmd.startswith('matches')
+
+ # @has <path> = file existence
+ if len(c.args) == 1 and not regexp and 'raw' not in c.cmd: