feat: basic tmux aliases
This commit is contained in:
parent
6cad0ad3f7
commit
d7e5659e77
3 changed files with 39 additions and 9 deletions
14
README.md
Normal file
14
README.md
Normal file
|
@ -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.
|
13
aliases
Normal file
13
aliases
Normal file
|
@ -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"
|
||||||
|
|
21
setup
21
setup
|
@ -1,12 +1,15 @@
|
||||||
# ZSH
|
#!/bin/bash
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
|
||||||
|
|
||||||
# NVM
|
SHELL_CONFIG_PATH=""
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
|
|
||||||
|
|
||||||
# YVM
|
if [[ -n $(echo $SHELL | grep zsh) ]]; then
|
||||||
curl -s https://raw.githubusercontent.com/tophat/yvm/master/scripts/install.js | node
|
SHELL_CONFIG_PATH="$HOME/.zshrc"
|
||||||
|
else
|
||||||
|
SHELL_CONFIG_PATH="$HOME/.bashrc"
|
||||||
|
fi
|
||||||
|
|
||||||
# pyenv
|
if [[ -z $(cat $SHELL_CONFIG_PATH | grep 'mcataford/env-managed-block') ]]; then
|
||||||
|
echo '# mcataford/env-managed-block:start
|
||||||
echo "Install PyEnv."
|
for f in ~/.env_goodies/*; do source $f; done
|
||||||
|
# mcataford/env-managed-block:end' >> $SHELL_CONFIG_PATH
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue