tmuxinator initialize pane with multiple commands

2019-04-05 04:21发布

I am using Tmuxinator, and I was wondering is there anyway to initialize a Tmux pane using multiple commands?

Example

panes:
    - vim
    - workon project              #activate virtualenv and ..
      ./manage.py runserver       #run sever

3条回答
我欲成王,谁敢阻挡
2楼-- · 2019-04-05 04:41

For particular using with virtualenv and if you don't want to include workon project && in every line, you can use pre_window, available from 0.6.0:

pre_window: workon project

Now before running any command, a workon project would be called first, allow you to have every new window in virtual environment.

查看更多
3楼-- · 2019-04-05 04:46

you could put && between commands.

panes:
    - vim
    - workon project &&           #activate virtualenv and ..
      ./manage.py runserver       #run sever
查看更多
对你真心纯属浪费
4楼-- · 2019-04-05 04:54

This is supported from 0.6.6.

name: sample
root: ~/

windows:
  - stats:
    - ssh stats@example.com
    - tail -f /var/log/stats.log
  - logs:
    layout: main-vertical
    panes:
      - logs:
        - ssh logs@example.com
        - cd /var/logs
        - tail -f development.log

Please refer to https://github.com/aziz/tmuxinator#passing-directly-to-send-keys

查看更多
登录 后发表回答