zshuper/modules/new-scratch.zsh
2018-02-03 02:29:33 +02:00

16 lines
411 B
Bash

#
# Quick scratch directory creator
#
# Create quick scratch directory for testing and other stuff
function new-scratch {
local SCRATCH="${HOME}/scratch"
local NEW_SCRATCH="${HOME}/tmp/scratch_$(date "+%s")"
__zspr_mkdir "${NEW_SCRATCH}"
ln -nfs "${NEW_SCRATCH}" "${SCRATCH}"
pushd "${SCRATCH}" > /dev/null
printf "New scratch dir ready for grinding ;>\n\n"
}
autoload -Uz new-scratch