Created
March 30, 2012 09:40
-
-
Save krisleech/2250386 to your computer and use it in GitHub Desktop.
automate tmux for quickstart rails project
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
#!/bin/sh | |
function matripa | |
{ | |
BASE="$HOME/code/matripa" | |
cd $BASE | |
tmux start-server | |
tmux new-session -d -s matripa -n vim | |
tmux new-window -t matripa:1 -n tests | |
tmux new-window -t matripa:2 -n servers | |
tmux new-window -t matripa:3 -n logs | |
tmux send-keys -t matripa:0 "cd $BASE; vim" C-m | |
tmux send-keys -t matripa:1 "cd $BASE; guard -c" C-m | |
tmux send-keys -t matripa:2 "cd $BASE; foreman start" C-m | |
tmux send-keys -t matripa:3 "cd $BASE; tail -f log/*.log" C-m | |
tmux select-window -t matripa:0 | |
tmux attach-session -t matripa | |
} |
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
# ~/.zshrc | |
source ~/bin/zsh/matripa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment