MPP-language-blender icon indicating copy to clipboard operation
MPP-language-blender copied to clipboard

relative file path handling

Open agarwal opened this issue 11 years ago • 1 comments

Consider you have a file in a directory called src/ with the following contents:

$ cat src/foo.mpp
(( input bar.txt ))

Currently, the file bar.txt is searched relative to the current working directory of whatever process you're calling mpp from. I think it would be more intuitive if the path was interpreted as relative to src/, i.e. the directory in which the mpp file resides.

One issue with this is related to my request in #7 for a library function corresponding to the command line app. If you provide a function val mpp_on_string : string -> string, which directly operates on a string, then you don't have a file path to get the parent directory from. A solution could be to have such a function also take an optional filename argument. If this argument is not provided, then you fallback to using the current working directory.

agarwal avatar May 07 '14 12:05 agarwal

It could be an option to give via the command line interface or via an environment variable...

pwbs avatar Aug 23 '16 08:08 pwbs