summaryrefslogtreecommitdiff
path: root/etc/functions/mkcd
blob: bd6158d7e08f5909a08a13d5ae4ea5ee6074bf99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
## vim:ft=zsh
## create a directory, then change into it
typeset -i ls=0
typeset dir=$1

if [[ -z $dir ]] {
	echo "Usage: mkcd <directory name>" > /dev/stderr
	return 1
}
if [[ -d $dir ]] ls=1
mkdir -p $dir
cd $dir
if ((ls)) ls --color=auto