diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2014-10-04 02:34:13 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2014-10-04 02:34:13 +1300 |
commit | c5bc116fac36b4492e74977daad81fea3a828345 (patch) | |
tree | 2eeaad048de94ef18675a81a3e404b19c9728fce /bash/bashrc.d/mkcd.bash | |
parent | Correct inverted test (diff) | |
download | dotfiles-c5bc116fac36b4492e74977daad81fea3a828345.tar.gz dotfiles-c5bc116fac36b4492e74977daad81fea3a828345.zip |
New mkcd function
Diffstat (limited to 'bash/bashrc.d/mkcd.bash')
-rw-r--r-- | bash/bashrc.d/mkcd.bash | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bash/bashrc.d/mkcd.bash b/bash/bashrc.d/mkcd.bash new file mode 100644 index 00000000..060e5f4a --- /dev/null +++ b/bash/bashrc.d/mkcd.bash @@ -0,0 +1,5 @@ +# Create a directory and change into it +mkcd() { + mkdir -p -- "$1" && cd -- "$1" +} + |