JanDeDobbeleer / aliae

Cross shell and platform alias management
https://aliae.dev
MIT License
73 stars 3 forks source link

Windows: Auto exporting env variables #33

Closed RuiNtD closed 10 months ago

RuiNtD commented 10 months ago

Code of Conduct

What would you like to see changed/added?

It would be nice if, on Windows, I could automatically export environment variables to the user env variables to be used outside of CLI, and to be managed within Aliae's config file along with my other env variables.

In combination with #31, this would allow me to do something like this:

env:
  - name: PRISMLAUNCHER_JAVA_PATHS
    value: |
      {{ .Home }}\scoop\apps\temurin8-jre\current\bin\javaw.exe
      {{ .Home }}\scoop\apps\temurin-lts-jre\current\bin\javaw.exe
    export: true

So that Prism Launcher can find my Java installs and I don't have to go crazy using Microsoft's env editor.

It's worth noting that this would only be user env variables, since system env variables would require an admin prompt every time you open a shell.