Skip to content

Instantly share code, notes, and snippets.

@JLarky
Created May 24, 2025 01:59
Show Gist options
  • Save JLarky/b2a7d22bfc93ecc2f50d49ca55ec22f8 to your computer and use it in GitHub Desktop.
Save JLarky/b2a7d22bfc93ecc2f50d49ca55ec22f8 to your computer and use it in GitHub Desktop.
tmp function with zsh
# tmp function
function tmp() {
local tmp_dir=$(mktemp -d)
echo "Created temporary directory: $tmp_dir"
cd $tmp_dir
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment