From 7da46f2cbd9d7d563da02144881fc5c9f4a2b086 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 18 Mar 2013 02:14:28 +0900 Subject: [PATCH] upddate function mkcd --- bashrc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 98f9dde..b015bd8 100755 --- a/bashrc +++ b/bashrc @@ -496,8 +496,14 @@ tb(){ } mkcd(){ - mkdir -p $1 - cd $1 + if test -d "$1" + then + echo "Dir \"$1\" already exists." + else + mkdir -p "$1" + echo "Dir \"$1\" created." + fi + cd "$1" } if test -n "$TMUX" && null type reattach-to-user-namespace