#294·superfile

enhancement: Custom file previews

Author: BlueFalconHDCreated Jul 13, 2024Updated Aug 18, 2026
Labelsenhancementdifficulty:hard

The part you want to Enhancement There is currently limited file preview support. One way to help everyone get what they need without forcing something on them is to make it configurable. What if you could simply specify a pattern to match and a command to run in your Superfile config to show a preview. It is a universal solution.

[previews]
"*.plist" = "ppl <filepath>" # Patterns that come first override the ones that come after.
"*" = "bat <filepath>" # <filepath> gets replaced with the full path of the file

Several other replacements could be possible, including:

  • <extension> File extension, if it exists
  • <filename> Short name of the file, for /tmp/123.txt, it would be 123.txt
  • <filepath> Full path to the file

Why it is necessary to enhancement Because not being able to preview specific files then requires exiting Superfile, using another tool to preview any necessary files, then continuing on.