This commit is contained in:
vonProteus 2025-03-22 19:10:57 +01:00
parent be0536de0b
commit 6f60a95167
Signed by untrusted user who does not match committer: vonProteus
GPG Key ID: 65472F126055FF23

18
zsh.d/50_cdtmp.zsh Normal file
View File

@ -0,0 +1,18 @@
# vim: ft=zsh
function cdtmp {
if [ -z "$MY_TEMP_DIR" ]; then
newtmp
fi
cd "$MY_TEMP_DIR"
}
function newtmp {
export MY_TEMP_DIR="$(mktemp -d)"
echo "new tmp dir in $MY_TEMP_DIR"
}
function cdnewtmp {
newtmp
cdtmp
}