Update README.md with GitHub-flavored Markdown syntax highlighting

This commit is contained in:
Rémi Prévost 2011-12-10 08:11:36 -05:00
parent 11af9bfe85
commit 4a6abd75a8

145
README.md
View File

@ -4,11 +4,13 @@ Teamocil is a simple tool used to automatically create sessions, windows and spl
## Usage ## Usage
$ gem install teamocil ```bash
$ mkdir ~/.teamocil $ gem install teamocil
$ teamocil --edit sample $ mkdir ~/.teamocil
$ tmux $ teamocil --edit sample
$ teamocil sample $ tmux
$ teamocil sample
```
## Options ## Options
@ -30,10 +32,12 @@ You can wrap your entire layout file in a `session` and Teamocil will rename the
#### Example #### Example
session: ```yaml
name: my-awesome-session session:
windows: name: "my-awesome-session"
[windows list] windows:
[windows list]
```
### Windows ### Windows
@ -49,27 +53,27 @@ If you are not using a top-level `session` key, then the first key of your layou
#### Example #### Example
windows: ```yaml
- name: my-first-window windows:
options: - name: "my-first-window"
synchronize-panes: true options:
root: ~/Projects/foo-www synchronize-panes: true
filters: root: "~/Projects/foo-www"
before: filters:
- "echo 'Lets use ruby-1.9.2 for each split in this window.'" before:
- "rvm use 1.9.2" - "echo 'Lets use ruby-1.9.2 for each split in this window.'"
splits: - "rvm use 1.9.2"
[splits list] splits:
- name: my-second-window [splits list]
root: ~/Projects/foo-api - name: "my-second-window"
filters: root: "~/Projects/foo-api"
after: "rvm use 1.9.2" splits:
splits: [splits list]
[splits list] - name: "my-third-window"
- name: my-third-window root: "~/Projects/foo-daemons"
root: ~/Projects/foo-daemons splits:
splits: [splits list]
[splits list] ```
### Splits ### Splits
@ -84,20 +88,22 @@ Every window must define an array of splits that will be created within it. A ve
#### Example #### Example
windows: ```yaml
- name: my-first-window windows:
root: ~/Projects/foo-www - name: "my-first-window"
filters: root: "~/Projects/foo-www"
before: "rvm use 1.9.2" filters:
after: "echo 'I am done initializing this split.'" before: "rvm use 1.9.2"
splits: after: "echo 'I am done initializing this split.'"
- cmd: "git status" splits:
- cmd: "bundle exec rails server --port 4000" - cmd: "git status"
width: 50 - cmd: "bundle exec rails server --port 4000"
- cmd: width: 50
- sudo service memcached start - cmd:
- sudo service mongodb start - "sudo service memcached start"
height: 50 - "sudo service mongodb start"
height: 50
```
## Layout examples ## Layout examples
@ -107,15 +113,16 @@ See more example files in the `examples` directory.
#### Content of `~/.teamocil/sample-1.yml` #### Content of `~/.teamocil/sample-1.yml`
windows: ```yaml
- name: sample-two-splits windows:
root: ~/Code/sample/www - name: "sample-two-splits"
splits: root: "~/Code/sample/www"
- cmd: splits:
- pwd - cmd: ["pwd", "ls -la"]
- ls -la - cmd: "rails server --port 3000"
- cmd: rails server --port 3000 width: 50
width: 50 ```
#### Result of `$ teamocil sample-1` #### Result of `$ teamocil sample-1`
@ -135,19 +142,21 @@ See more example files in the `examples` directory.
#### Content of `~/.teamocil/sample-2.yml` #### Content of `~/.teamocil/sample-2.yml`
windows: ```yaml
- name: sample-four-splits windows:
root: ~/Code/sample/www - name: "sample-four-splits"
splits: root: "~/Code/sample/www"
- cmd: pwd splits:
- cmd: pwd - cmd: "pwd"
width: 50 - cmd: "pwd"
- cmd: pwd width: 50
height: 50 - cmd: "pwd"
target: bottom-right height: 50
- cmd: pwd target: "bottom-right"
height: 50 - cmd: "pwd"
target: bottom-left height: 50
target: "bottom-left"
```
#### Result of `$ teamocil sample-2` #### Result of `$ teamocil sample-2`
@ -169,7 +178,9 @@ See more example files in the `examples` directory.
To get autocompletion when typing `teamocil <Tab>` in a zsh session, add this line to your `~/.zshrc` file: To get autocompletion when typing `teamocil <Tab>` in a zsh session, add this line to your `~/.zshrc` file:
compctl -g '~/.teamocil/*(:t:r)' teamocil ```zsh
compctl -g '~/.teamocil/*(:t:r)' teamocil
```
## Todo list ## Todo list