kamiyaa / joshuto

ranger-like terminal file manager written in Rust
https://crates.io/crates/joshuto
GNU Lesser General Public License v3.0
3.35k stars 151 forks source link

Add "--config" flag as a CLI argument #479

Closed Lodobo closed 5 months ago

Lodobo commented 5 months ago

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?

kamiyaa commented 5 months ago

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

Lodobo commented 5 months ago

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.