teamocil icon indicating copy to clipboard operation
teamocil copied to clipboard

Custom config path?

Open Eoin-McMahon opened this issue 3 years ago • 2 comments

Is it possible to have my .yml file in a different directory than ~/teamocil I would rather have all my configuration stuff in .ocnfig/ i.e .config/teamocil/configuration.yml

Is this possible in the current version of teamocil? I don't see anything about it in the readme

Eoin-McMahon avatar Jul 04 '21 12:07 Eoin-McMahon

Hi Eóin,

Teamocil currently only supports ~/.teamocil (source).

However, there is a very simple way to achieve what you want — you can create a symbolic link at ~/.teamocil to point to another directory.

$ ln -s ~/config/teamocil ~/.teamocil
$ ls -a ~ | grep teamocil
.teamocil -> ~/config/teamocil

Hope this helps!

remi avatar Jul 07 '21 17:07 remi

I don't know whether you are open to PR's or not but it would be nice to even have something like this:

  class CLI < ClosedStruct.new(:arguments, :environment)
    DIRECTORY = ENV['TEAMOCIL_CONFIG'] || '$HOME/.teamocil'

Sym links can get messy, especially when you move machines a lot.

Otherwise a -c CONFIG_PATH argument would be nice

Eoin-McMahon avatar Jul 09 '21 13:07 Eoin-McMahon