Last active
June 21, 2020 11:24
-
-
Save twneale/5272534 to your computer and use it in GitHub Desktop.
Never type "touch __init__.py" again
This file contains 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
# I just put this puppy in my .bashrc. | |
# Usage: | |
# - pin # equivalent to "touch __init__.py" | |
# - pin some/dir # equivalent to "touch some/dir/__init__.py" | |
# | |
# Thanks to paultag for lending me his bash chops. | |
# | |
function pin { if [ "x$1" = "x" ]; then DIR="./"; else DIR="$1"; fi; touch ${DIR}/__init__.py; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why?