Go GROUPCOLLAPSE if group name has a "#"

Steps to reproduce:

  1. Make a dir like C:\A#
  2. Make an empty text file under it.
  3. Enable grouping by location.
  4. Use Go GROUPCOLLAPSE "C:\A#"

Group does not collapse as expected. Removing the "#" makes it work.

The # symbol is a wildcard character, use an apostrophe to escape it:

Go GROUPCOLLAPSE "C:\A'#"

Oops, sorry. In all these years, I don't think I ever used # as an wildcard.

Added .replace(/(\#|\?|\||\~|\(|\)|\[|\])/g, "'$1") to my .js script, should do the trick.