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

Use environment variable in editorconfig.json #128

Closed
mb720 opened this issue Oct 24, 2024 · 6 comments
Closed

Use environment variable in editorconfig.json #128

mb720 opened this issue Oct 24, 2024 · 6 comments

Comments

@mb720
Copy link
Contributor

mb720 commented Oct 24, 2024

Hi and thanks again for withExEditorHost!

Is there currently a way to have environment variables resolved in editorconfig.json?

I tried

"editorPath": "/usr/bin/${TERMINAL}",

to no avail. In my Bash, echo $TERMINAL prints "kitty".

Thanks in advance!

@asamuzaK
Copy link
Owner

Like this?

  • Accept environment variable during setup
    e.g. /usr/bin/${TERMINAL} as user input
  • Save resolved value in editorConfig.json
    e.g. "editorPath": "/usr/bin/kitty"

Or is there a reason you want to save user input as is?

@asamuzaK
Copy link
Owner

Forget about the previous comment.

There is a possibility that sensitive data is held in the environment variable, we should save it as is.

@asamuzaK
Copy link
Owner

Forgot to cut the branch and committed it directly...

Anyway, the issue is fixed and you can use environment variable in editorconfig.json.

@mb720
Copy link
Contributor Author

mb720 commented Oct 28, 2024

Thanks for implementing this so quickly. I'll try the feature once there's a new release.

@asamuzaK
Copy link
Owner

Released v8.1.1

@mb720
Copy link
Contributor Author

mb720 commented Oct 31, 2024

I just used the new feature and it worked like a charm:

"editorPath": "/usr/bin/${TERMINAL}",

Thanks again. Your response time is amazing 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants