Last active
April 3, 2018 16:03
-
-
Save puglyfe/5bec8e9f9dd8d1e5cb56fcb2e12fcaa7 to your computer and use it in GitHub Desktop.
create a folder and cd to it in one command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use: mkcd my-directory | |
function mkcd() { | |
if [ -n "$1" ]; then | |
mkdir "$1" && cd $_ | |
else | |
echo "Must specify a directory to create" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment