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
ex() { | |
if [ -f "$1" ]; then | |
case $1 in | |
*.tar.gz) tar xzf $1;; | |
*.rar) unrar x $1;; | |
*.gz) gunzip $1;; | |
*.tar) tar xf $1;; | |
*.tgz) tar xzf $1;; | |
*.zip) unzip $1;; | |
*.7z) 7z x $1;; |
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
pload() { | |
local ENV_DIR=".pyenv" | |
local SCRIPT_PATH="$ENV_DIR/bin/activate" | |
if [ -d "$ENV_DIR" ] && [ -f "$SCRIPT_PATH" ]; then | |
source "$SCRIPT_PATH" | |
else | |
read -p "environment not found. create one? (Y|n) " choice | |
case $choice in | |
Y|y|"") |