@NotNull public static List<String> completeRelativePath(@NotNull String baseDir,@NotNull String shownBaseDir,@NotNull String relativePath){
  List<String> result=Lists.newLinkedList();
  String bashBaseDir=OSUtil.toBashCompatible(baseDir);
  for (  String path : completeAbsolutePath(baseDir + File.separator + relativePath,Predicates.<File>alwaysTrue())) {
    if (path.startsWith(bashBaseDir)) {
      result.add(shownBaseDir + path.substring(bashBaseDir.length()));
    }
  }
  return result;
}

@ NotNull public static List < String > completeRelativePath ( @ NotNull String baseDir , @ NotNull String shownBaseDir , @ NotNull String relativePath ) { List < String > result = Lists . newLinkedList ( ) ; String bashBaseDir = OSUtil . toBashCompatible ( baseDir ) ; for ( String path : completeAbsolutePath ( baseDir + File . separator + relativePath , Predicates . < File > alwaysTrue ( ) ) ) { if ( path . startsWith ( bashBaseDir ) ) { result . add ( shownBaseDir + path . substring ( bashBaseDir . length ( ) ) ) ; } } return result ; }
collect a list of relative paths . the start directory for the match is given as separate parameter .
