From 5f0afcdd3cd8870954087c7c05dd40ae5ed0ef4e Mon Sep 17 00:00:00 2001 From: Derek Prior Date: Tue, 21 Dec 2010 14:28:40 -0500 Subject: [PATCH] Added function to mkdir and immediately change to it --- lib/directories.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/directories.zsh b/lib/directories.zsh index 56d7a231..bb114f61 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -36,5 +36,9 @@ cd () { alias md='mkdir -p' alias rd=rmdir +alias d='dirs -v' -alias d='dirs -v' \ No newline at end of file +# mkdir & cd to it +function mcd() { + mkdir -p "$1" && cd "$1"; +} \ No newline at end of file