-
-
Save matthewtodd/798387 to your computer and use it in GitHub Desktop.
script/tmux
This file contains 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 | |
tmux start-server | |
if ! $(tmux has-session -t grow); then | |
tmux new-session -d -s grow -n foreground | |
tmux send-keys 'cd .' C-m C-l | |
tmux send-keys 'AUTOFEATURE=true autotest --quiet' C-m | |
tmux split-window -h | |
tmux send-keys 'cd .' C-m C-l | |
tmux new-window -t grow:1 -n background | |
tmux send-keys 'cd .' C-m C-l | |
tmux send-keys 'rails server -b 127.0.0.1' C-m | |
tmux split-window -h | |
tmux send-keys 'cd .' C-m C-l | |
tmux send-keys 'spork rspec' C-m | |
tmux split-window -h | |
tmux send-keys 'cd .' C-m C-l | |
tmux send-keys 'spork cucumber' C-m | |
tmux select-layout main-vertical | |
tmux select-window -t grow:0 | |
fi | |
tmux -2 attach-session -t grow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
All the extra "cd ." commands are there to trigger rvm's sourcing .rvmrc. Would like a nicer workaround.