Can I pass a config file directly to tmuxinator on the command-line?
Asked Answered
O

1

6

I'm new to tmuxinator, so forgive me if this is a naive question.

I have a tmuxinator config file (say, my_config.yaml,) stored in a source tree of a shared project.

For others to use it, AFAICT they first have to make a soft-link from the config file to inside thier home directory, then launch tmuxinator separately:

$ ln -rs my_config.yaml ~/.tmuxinator/
$ tmuxinator my_config

This is inconvenient, and also requires that all your config files have unique filenames, lest they collide in ~/.tmuxinator/.

I'd much rather just be able to do something like:

$ tmuxinator my_config.yaml

Is there a way to pass the config file to tmuxinator on the command line?

Odontology answered 1/3, 2018 at 21:6 Comment(0)
F
7

Is there a way to pass the config file to tmuxinator on the command line?

Not currently. Feel free to open a feature request/issue on GitHub.

Tmuxinator does, however, support project level config files. If you move my_config.yml to /project/root/.tmuxinator, you can then start it (from the project root) via tmuxinator start . or tmuxinator local.

UPDATE:

As I added below in the comments, this is now possible using the -p flag:

tmuxinator start -p /path/to/my_config.yml

Flock answered 2/3, 2018 at 15:59 Comment(4)
Good to know; thanks. I've filed a feature request: github.com/tmuxinator/tmuxinator/issues/595Odontology
For anyone stumbling upon this in the future: as of v0.11.0, tmuxinator now supports OP's desired use case and a project config file can be passed to tmuxinator via: tmuxinator start -p /path/to/my_config.ymlFlock
@Flock please add this to your answer: tmuxinator start <project name> -p /path/to/my_config.ymlMice
There is a typo in Rubber Duck's comment: there is no need to add <project name> when using the -p flag.Dipole

© 2022 - 2024 — McMap. All rights reserved.