formatPathRelativeToCwd function
Renders path relative to cwd when it sits underneath it (omp's
formatPathRelativeToCwd, reduced to the common case).
Implementation
String formatPathRelativeToCwd(String path, String cwd) {
final prefix = cwd.endsWith('/') ? cwd : '$cwd/';
if (path.startsWith(prefix)) return path.substring(prefix.length);
return path;
}