@Larvitz About the `pushd` / `popd` trick: you can use it to switch between set of directories with `dirs -v` to get list of directories on stack and `pushd +<n>` (e.g. `pushd +1`) to switch to n-th directory on the stack.
About `tee`: I have recently found a nice trick to make the `tee` command useful in presence of progress bars and colors, namely `| tee >(grep -v $'\r' | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' >command.out)` - which probably could be simplified.