From 8816edd80582887015fc927beedb5c9245ee9783 Mon Sep 17 00:00:00 2001 From: MaYuming Date: Fri, 30 Jun 2017 17:03:50 +0800 Subject: [PATCH] fix mkcd issue #993 --- plugins/available/base.plugin.bash | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/available/base.plugin.bash b/plugins/available/base.plugin.bash index 5450a416..5b1da887 100755 --- a/plugins/available/base.plugin.bash +++ b/plugins/available/base.plugin.bash @@ -88,7 +88,7 @@ function pmdown () echo "You don't have a markdown command installed!" fi } - +#if using mkcd many dirs, it will make all dirs and cd into the lastest one. function mkcd () { about 'make a directory and cd into it' @@ -96,8 +96,7 @@ function mkcd () example '$ mkcd foo' example '$ mkcd /tmp/img/photos/large' group 'base' - mkdir -p -- "$*" - cd -- "$*" + mkdir -p "$@" && eval cd "\"\$$#\"" } function lsgrep ()