Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable recursive .env sourcing #11920

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

heitorpolidoro
Copy link

Standards checklist:

  • The PR title is descriptive.
  • The PR doesn't replicate another PR which is already open.
  • I have read the contribution guide and followed all the instructions.
  • The code follows the code style guide detailed in the wiki.
  • The code is mine or it's from somewhere with an MIT-compatible license.
  • The code is efficient, to the best of my ability, and does not waste computer resources.
  • The code is stable and I have tested it myself, to the best of my abilities.
  • If the code introduces new aliases, I provide a valid use case for all plugin users down below.

Changes:

  • Add an option to do a recursive source of .env, from a configured ROOT directory to the current working directory, enabling ENVs overwriting
  • ENVs added
    • ZSH_DOTENV_RECURSIVE: Default false, if true enables recursive sourcing
    • ZSH_DOTENV_ROOT: Default $HOME, the root directory to starting sourcing from

Other comments:

My use case: I need to install a python library from a private repository in more than one os my repositories so, instead off heaving multiples .env to define GH_USERNAME and GH_TOKEN I can have only one.

@mcornella

@ohmyzsh ohmyzsh bot added Area: plugin Issue or PR related to a plugin Type: documentation Documentation issue or Pull Request labels Sep 29, 2023
@heitorpolidoro heitorpolidoro changed the title feat(dotenv): var to enable recusrive .env sourcing Enable recursive .env sourcing Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin Type: documentation Documentation issue or Pull Request
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

None yet

1 participant