Skip to content

Instantly share code, notes, and snippets.

@twneale
Last active June 21, 2020 11:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twneale/5272534 to your computer and use it in GitHub Desktop.
Save twneale/5272534 to your computer and use it in GitHub Desktop.
Never type "touch __init__.py" again
# 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; }
@ShahramTor
Copy link

Why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment