When working in projects that have deeply nested directory structures (e.g. Java/Scala projects) it would be great to identify the project's working directory by searching for common top-level project files...
- Given open file is
/Users/leppich/workspace/ProjectA/src/main/java/com/example/Example.java
- And file exists
/Users/leppich/workspace/ProjectA/pom.xml
- When DTerm gets invoked
- Then working directory should be
/Users/leppich/workspace/ProjectA/
The working directory could be discovered by searching the filepath upwards for entries like:
Makefile, Rakefile, build.xml, pom.xml, .git, .svn, .hg etc..