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

Autocomplete environment variables #1169

Open
Chaitanyabsprip opened this issue Jun 2, 2024 · 1 comment
Open

Autocomplete environment variables #1169

Chaitanyabsprip opened this issue Jun 2, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Chaitanyabsprip
Copy link

What is the problem this feature will solve?

Currently, bash-ls provides completions only for variables that have been defined in the scope. However I wish for the server to provide completions for environment variables as well. Using environment variables are a very common occurrence when writing scripts.

What is the feature you are proposing to solve the problem?

Bash-ls should provide completions for environment variables as well. However, care should be taken that completionResolve method is not exposing the values of the environment variables. Priority should be given to variables in scope, environment variables should be trailing.

What alternatives have you considered?

currently, as a workaround I dump the envvars at the top of my file until I'm writing the script and then delete it when I'm done.

@Chaitanyabsprip Chaitanyabsprip added the enhancement New feature or request label Jun 2, 2024
@Chaitanyabsprip
Copy link
Author

I've worked on this and I'm using my version locally. I raised this issue primarily to discuss whether there is scope for this feature in this tool as well. If so, I'll quickly raise a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant