#!/usr/bin/env fish function clean_temp --on-process %self echo 'deleting' $FAKEHOME'...' rm -rf $FAKEHOME end set -x FAKEHOME (mktemp -d /tmp/fakehome-XXX) set -x HOME $FAKEHOME set -x XDG_CONFIG_HOME $HOME/config set -x XDG_DATA_HOME $HOME/data set -x XDG_CACHE_HOME $HOME/cache cd $HOME fish