module Thor::Util
def self.escape_globs(path)
String
==== Returns
String
==== Parameters
Thor::Util.escape_globs('[apps]') # => '\[apps\]'
==== Examples
The glob characters are `* ? { } [ ]`.
Returns a string that has had any glob characters escaped.
def self.escape_globs(path) path.to_s.gsub(/[*?{}\[\]]/, '\\\\\\&') end