Open build terminals in $BUILDDIR, if it exists
For an Autotools project built out-of-tree against my host system, I wanted a terminal open in the builddir so I could manually run make check
. I expected that "New Build Terminal" would give me a terminal whose working directory was the builddir, but it instead put me in the sourcedir.
I did not think to check the environment; cd $BUILDDIR
was what I wanted. @chergert explained:
I think the reason we don't drop you into $BUILDDIR immediately is that its possible it doesn't exist yet; but presumably we could check that and maybe we should
I think that, if $BUILDDIR exists, it would be a more helpful default working directory. I probably know where the source directory is, so it's not the end of the world if I don't realise I can cd $SRCDIR
to get back there. But without realising that $BUILDDIR was defined, I ended up copy-pasting the path from the build logs.