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

Sourcing: support basic variable expansions #659

Open
skovhus opened this issue Jan 5, 2023 · 1 comment · May be fixed by #1086
Open

Sourcing: support basic variable expansions #659

skovhus opened this issue Jan 5, 2023 · 1 comment · May be fixed by #1086
Labels
enhancement New feature or request

Comments

@skovhus
Copy link
Collaborator

skovhus commented Jan 5, 2023

#244 introduced sourcing aware symbol resolution where source commands (e.g. . myfile.sh or source ./file.bash) is used for figure out which symbols are available in a given context.

The current implementation is fairly crude and can be extended a bit to resolve basic variable expansions and sourcing statements in functions and loops.

@skovhus skovhus added the enhancement New feature or request label Jan 5, 2023
@skovhus
Copy link
Collaborator Author

skovhus commented Jan 11, 2023

With #673 we now just miss basic variable expansion support.

@skovhus skovhus changed the title Sourcing: support basic variable expansions and non root statements Sourcing: support basic variable expansions Jan 17, 2023
aarondill added a commit to aarondill/bash-language-server that referenced this issue Jan 21, 2024
This does the same thing that ShellCheck does ([here](https://github.com/koalaman/shellcheck/blob/ba86c6363c30a5dbefd0b8b9a7c5f4ab0478dc91/src/ShellCheck/Parser.hs#L2277-L2283)).

`To support the common pattern of . "$CONFIGDIR/mylib.sh", ShellCheck strips one leading, dynamic section before trying to locate the rest.`

fixes bash-lsp#926, fixes bash-lsp#659
aarondill added a commit to aarondill/bash-language-server that referenced this issue Feb 6, 2024
This does the same thing that ShellCheck does ([here](https://github.com/koalaman/shellcheck/blob/ba86c6363c30a5dbefd0b8b9a7c5f4ab0478dc91/src/ShellCheck/Parser.hs#L2277-L2283)).

`To support the common pattern of . "$CONFIGDIR/mylib.sh", ShellCheck strips one leading, dynamic section before trying to locate the rest.`

fixes bash-lsp#926, fixes bash-lsp#659
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

Successfully merging a pull request may close this issue.

1 participant