From: martin f. krafft Date: Sun, 29 Jan 2012 08:55:11 +0000 (+0100) Subject: fix symlink creation for cdt.latest X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/65f136b35f8d1185aae360ce182022cefc214a4e?ds=sidebyside;hp=a89e29c6ee8aec55e559f411431108c850533154 fix symlink creation for cdt.latest --- diff --git a/.zsh/zshrc/39_tempfuncs b/.zsh/zshrc/39_tempfuncs index 79f43dd..d3391f6 100644 --- a/.zsh/zshrc/39_tempfuncs +++ b/.zsh/zshrc/39_tempfuncs @@ -13,12 +13,13 @@ cdt () { tmpdir=$(mktemp -td ${1:-cdt}.XXXXXX) builtin cd $tmpdir pwd - ln -sf $tmpdir ${TMPDIR:-/tmp}/cdt.latest + rm -f ${TMPDIR:-/tmp}/cdt.latest + ln -s $tmpdir ${TMPDIR:-/tmp}/cdt.latest } vit () { local prefix - for i in "$@"; do + for i in "$@"; do case "$i" in -) local stdin=1; shift;; *) if [ -z "${prefix:-}" ]; then