fix mkcd issue #993

pull/994/head
MaYuming 2017-06-30 17:03:50 +08:00
parent be077be3f5
commit 8816edd805
1 changed files with 2 additions and 3 deletions

View File

@ -88,7 +88,7 @@ function pmdown ()
echo "You don't have a markdown command installed!" echo "You don't have a markdown command installed!"
fi fi
} }
#if using mkcd many dirs, it will make all dirs and cd into the lastest one.
function mkcd () function mkcd ()
{ {
about 'make a directory and cd into it' about 'make a directory and cd into it'
@ -96,8 +96,7 @@ function mkcd ()
example '$ mkcd foo' example '$ mkcd foo'
example '$ mkcd /tmp/img/photos/large' example '$ mkcd /tmp/img/photos/large'
group 'base' group 'base'
mkdir -p -- "$*" mkdir -p "$@" && eval cd "\"\$$#\""
cd -- "$*"
} }
function lsgrep () function lsgrep ()