There may be a better way, but this seems to work. #+begin_src sh :dir (substitute-in-file-name "$HOME/.emacs.d/") :results output ls | tail -2 #+end_src #+RESULTS: : tramp : url