sbdchd / neoformat

:sparkles: A (Neo)vim plugin for formatting code.
BSD 2-Clause "Simplified" License
1.98k stars 188 forks source link

Escape filenames with the $ character #444

Open oliversong opened 1 year ago

oliversong commented 1 year ago

I'm having issues getting Neoformat to run prettier on a file with a dollar sign in its filename. When I rename the file to not have a dollar sign, it runs properly.

Repro:

  1. Make a file with name test.$id.tsx
  2. Try to run :Neoformat in it
  3. Fails with Neformat: formatters ./node_modules/bin/prettier, clang-format failed to run
  4. Rename the file to test.id.tsx
  5. Run :Neoformat
  6. Works properly

Prettier cli also is able to properly run on this file if run directly from shell. My guess is that Neoformat is not properly escaping the $ character?