1 2 3 4 5 6 7
function te --description "take a temporary directory" if set -q argv[1] cd (command mktemp -d /tmp/$argv[1].XXXX) else cd (command mktemp -d /tmp/.XXXX) end end