I have a custom 'Compile Single File' procedure looking like this:
echo [[local res = split("$(ACTIVE_EDITOR_DIRNAME)","/"); print(res[0]);]] >out.txt
(For debugging only - I really want to invoke $make with the subdir of the active editor file...)
In out.txt I see the full directory path - the split command seems to fail. res.len() is 1.
e.g.:
the path is /proj/myproj/src/mysub/ and I would expect the split command to return:
["","proj","myproj","src","mysub",""]
but the result is:
["/proj/myproj/src/mysub/"]
Any suggestions how to get the last part of the path?