joshuto icon indicating copy to clipboard operation
joshuto copied to clipboard

Add "--config" flag as a CLI argument

Open Lodobo opened this issue 1 year ago • 1 comments

It would be useful in scripts to be able to start joshuto with a one-off config that is different from the system config. Being able to specify which config to load when you execute the program would be really great.

Something like this:

joshuto --config="/path/to/config"

I can see how it could be an issue since all the config files are separate. So maybe you could add an option to import the other config files from the main config?

Lodobo avatar Jan 16 '24 15:01 Lodobo

I can see how it could be an issue since all the config files are separate. So maybe you could add an option to import the other config files from the main config?

maybe provide a --config-dir instead? all the files in that directory will be considered joshuto's config.

It would be useful in scripts to be able to start joshuto with a one-off config that is different from the system config. Being able to specify which config to load when you execute the program would be really great.

Have you considered just changing the environment variables in your scripts to point to a different directory?

https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/README.md#configuration

kamiyaa avatar Jan 20 '24 23:01 kamiyaa

Have you considered just changing the environment variables in your scripts to point to a different directory?

Thank you, I had not considered that. Indeed, that does the trick. A command line flag seems redundant.

Lodobo avatar Jan 22 '24 20:01 Lodobo