将参数传递给 tmuxinator 项目文件
pass arguments to tmuxinator project file
我有一个像
这样的项目文件
windows:
- server:
layout: even-vertical
panes:
- ssh -t {pass value in here} tail -f -n 100 /var/log/app.log
-
我想在开始会话时传入 SSH 主机。像
mux project for.bar
可以这样吗
检查 this section Tmuxinator 的自述文件。
You can also pass arguments to your projects, and access them with
ERB. Simple arguments are available in an array named @args.
Eg:
$ tmuxinator start project foo
~/.tmuxinator/project.yml
name: project root: ~/<%= @args[0] %>
... You can also pass key-value pairs using the format key=value.
These will be available in a hash named @settings.
Eg:
$ tmuxinator start project workspace=~/workspace/todo
~/.tmuxinator/project.yml
name: project root: ~/<%= @settings["workspace"] %>
...
我有一个像
这样的项目文件windows:
- server:
layout: even-vertical
panes:
- ssh -t {pass value in here} tail -f -n 100 /var/log/app.log
-
我想在开始会话时传入 SSH 主机。像
mux project for.bar
可以这样吗
检查 this section Tmuxinator 的自述文件。
You can also pass arguments to your projects, and access them with ERB. Simple arguments are available in an array named @args.
Eg:
$ tmuxinator start project foo
~/.tmuxinator/project.yml
name: project root: ~/<%= @args[0] %>
... You can also pass key-value pairs using the format key=value. These will be available in a hash named @settings.
Eg:
$ tmuxinator start project workspace=~/workspace/todo
~/.tmuxinator/project.yml
name: project root: ~/<%= @settings["workspace"] %>
...