diff --git a/README.md b/README.md new file mode 100644 index 0000000..02cf1f6 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Shell goodies + +A collection of shell enhancement for everyday happiness. + +## Setup + +```bash +git clone git@github.com:mcataford/env.git ~/.env_goodies | . ./setup +``` + +## Updating existing setups + +Since `~/.env_goodies` is a cloned repository, pulling new changes should update everything. You may need to `source` +the shell configuration file again for new goodies to apply. diff --git a/aliases b/aliases new file mode 100644 index 0000000..85decf2 --- /dev/null +++ b/aliases @@ -0,0 +1,13 @@ +################ +# TMUX-related # +################ + +# Lists all sessions +alias ts="tmux ls" + +# Attaches to session with name $1 +alias ta="tmux attach -t $1" + +# Create new session with provided name. +alias tm="tmux new -s $1" + diff --git a/setup b/setup index ff25392..2f69194 100644 --- a/setup +++ b/setup @@ -1,12 +1,15 @@ -# ZSH -sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +#!/bin/bash -# NVM -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash +SHELL_CONFIG_PATH="" -# YVM -curl -s https://raw.githubusercontent.com/tophat/yvm/master/scripts/install.js | node +if [[ -n $(echo $SHELL | grep zsh) ]]; then + SHELL_CONFIG_PATH="$HOME/.zshrc" +else + SHELL_CONFIG_PATH="$HOME/.bashrc" +fi -# pyenv - -echo "Install PyEnv." +if [[ -z $(cat $SHELL_CONFIG_PATH | grep 'mcataford/env-managed-block') ]]; then + echo '# mcataford/env-managed-block:start +for f in ~/.env_goodies/*; do source $f; done +# mcataford/env-managed-block:end' >> $SHELL_CONFIG_PATH +fi