bash-language-server icon indicating copy to clipboard operation
bash-language-server copied to clipboard

Autocomplete environment variables

Open Chaitanyabsprip opened this issue 8 months ago • 1 comments

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 avatar Jun 02 '24 18:06 Chaitanyabsprip