Last active
August 29, 2022 13:00
-
-
Save llagerlof/3a4e76774ad241afdd0d6afc8338511e to your computer and use it in GitHub Desktop.
Create a directory, copy the full path to the clipboards and enter the directory
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
# Paste this function into your ~/.bashrc | |
# Before use, install the xclip package of your distro, if isn't installed yet. | |
# Create a directory, copy the full path to the clipboards and enter the directory | |
md() { | |
mkdir "$1" || return 1 | |
realpath "$1" | tr -d '\n' | xclip -selection clipboard | |
realpath "$1" | tr -d '\n' | xclip | |
cd "$1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment