diff --git a/shells/zshrc b/shells/zshrc index 1674c3d..e7a4e0d 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -23,8 +23,18 @@ function asroot(){ xauth extract $TEMPFILE $DISPLAY sudo zsh -c "xauth merge $TEMPFILE;(srm $TEMPFILE||rm $TEMPFILE)&'$@';" } +dsl() { + while (( $# > 0 )); do + readlink $1 2>&1 >/dev/null && mv $(readlink $1) $1 + shift + done +} function dedir(){ - mv "$1"/{.,}* . + mv "$1"/* . + rmdir "$1" + if (( !? != 0 )); then + mv "$1"/.* . + fi rmdir "$1" } alias cpatch='diff -crB'