Skip to content

Commit

Permalink
Add example about checking whether window has something running
Browse files Browse the repository at this point in the history
  • Loading branch information
kurko committed Aug 24, 2020
1 parent ed28fb5 commit c8f2e4b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,17 @@ For example, for a Ruby project, including Rails projects, create the file
`.smartest.ruby` and write in it what you want Smartest to run. Ideally put it
in `.gitignore`.

For example, if you're using Docker and is running the bash in a Tmux pane (e.g
1), you could press `<leader>r` and have it run it on the pane 1. Define
For example, if you're using Docker and is running the bash in a Tmux window (e.g
1), you could press `<leader>r` and have it run it on window 1. Define
`.smartest.ruby`:

tmux send-keys -t 1 "time rspec --color --order random $filename" ENTER

or a more complex example, checking that the first window is actually in a
`test` environment and selecting that window:

tmux send-keys -t 1 "[ \"\$RAILS_ENV\" == \"test\" ] && time rspec --color --order random $filename" ENTER; tmux select-window -t 1

These are the files you can use:

- `.smartest.ruby`
Expand Down

0 comments on commit c8f2e4b

Please sign in to comment.