diff --git a/bashrc b/bashrc
index edd5626..91f6d6a 100755
--- a/bashrc
+++ b/bashrc
@@ -590,7 +590,11 @@ tb(){
}
mkcd(){
- if test -d "$1"
+ if test -z "$1"
+ then
+ echo "mkcd: usage: mkcd
"
+ return 1
+ elif test -d "$1"
then
echo "Dir \"$1\" already exists."
else
@@ -600,6 +604,12 @@ mkcd(){
cd "$1"
}
+mkcdd(){
+ # make and change date directory
+ _d=`date +%Y%m%d-%H%M%S`
+ mkcd "$_d"
+}
+
if test -n "$TMUX" && null type reattach-to-user-namespace
then
alias pbpaste="reattach-to-user-namespace pbpaste"