I've found myself in a couple of situations now where I'd like to have such a "file" that essentially runs a script whenever it's "opened", allowing me to "read" it's output.
For example, I might have a configuration file in some project which I'd like to use locally, but due to differences in my machine I need to run a sed or grep over it to make it work. The project's configuration file is still being maintained, and I'd like those changes to appear in my local configuration. This means doing the simple thing by modifying it then saving it is not ideal since it is easy for it to get stale as the project updates. I'd like the filtering to happen every time I open my local configuration file.
Is there some way for me to achieve this kind of thing? I know that the virtual file system allows you to make some pretty crazy things appear as "files", so I feel like this is not outside the realm of possibility.