summaryrefslogtreecommitdiff
path: root/etc/functions/mkcd
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-03-21 22:48:57 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-03-21 22:48:57 +0100
commitc078b9677bc81e15a1d81d29150893df09043be3 (patch)
tree0af0c90ad6540fb69b7b8da112918b5da8609b48 /etc/functions/mkcd
parentcbd81fff08d499a8bccb4f3d9542b80642c1ea94 (diff)
Added mkcd function (mkdir $1 && cd $1)
Diffstat (limited to 'etc/functions/mkcd')
-rwxr-xr-xetc/functions/mkcd7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/functions/mkcd b/etc/functions/mkcd
new file mode 100755
index 0000000..553c90e
--- /dev/null
+++ b/etc/functions/mkcd
@@ -0,0 +1,7 @@
+## vim:ft=zsh
+typeset -i ls=0
+[[ -d $1 ]] && ls=1
+mkdir -p $1
+cd $1
+((ls)) && ls
+true