Giter Site home page Giter Site logo

Allow for config instead of ENV about gbt HOT 3 CLOSED

hoshsadiq avatar hoshsadiq commented on August 15, 2024
Allow for config instead of ENV

from gbt.

Comments (3)

jtyr avatar jtyr commented on August 15, 2024 1

I'm personally not convinced that such feature is useful but if you are going to invest your time to implement it, I'm wiling to merge it if it fulfills the following criteria:

  1. It must support multiple config files which will override each others variables in the order the files are specified on the command line.
  2. Variables from the config file are merged with env vars the way that env vars have always the highest priority.
  3. Use TOML as the configuration format.

Example:

$ export GBT_CAR_DIR_PRECISSION=9999
$ cat /path/to/file1
# Global variables
separator = ""
# Dir car variables
[dir]
fg = "yellow"
$ cat /path/to/file2
# Dir car variables
[dir]
fg = "red"
depth = 3
$ gbt --config /path/to/file1 --config /path/to/file2

As a result of the above, the Dir car will end up with red foreground and depth of 9999.

from gbt.

jtyr avatar jtyr commented on August 15, 2024

Thanks or your suggestion. You can always create a file with all the env variables and source that file in your .bashrc file. For now I have no intention to support any other configuration.

from gbt.

hoshsadiq avatar hoshsadiq commented on August 15, 2024

My point was that it muddies the environment, typing env will give you a million variables. Imo these are unnecessary. If I were to raise a PR, would it be accepted (providing you're happy with the implementation)?

from gbt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.