Skip to content

Commit

Permalink
add date to cdtmp
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagowfx committed Sep 16, 2024
1 parent 33a6320 commit f3435c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion profile/.profile.d/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# Inspiration from https://frantic.im/cdtmp/ and grml-zsh-config's cdt
# Usage: cdtmp [foo]
cdtmp() {
builtin cd "$(mktemp -d "/tmp/$USER-${1:+$1-}XXXXXX")" || return
builtin cd "$(mktemp -d "/tmp/$USER-${1:+$1-}$(date +%Y-%m-%d)-XXXXXX")" || return
builtin pwd
}

0 comments on commit f3435c5

Please sign in to comment.