We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If an assign statement is used after local, global, and export it is treated as a word node, not an assignment node.
The text was updated successfully, but these errors were encountered:
Agree. I often will declare functions as:
foo() { local key="$1" local value="$2" # Do the "needful" }
Sorry, something went wrong.
I was unable to reproduce an issue with local, global, or export using version 0.18.
local
global
export
In a Python interactive session (using bashlex v0.18):
Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import bashlex >>> bashlex.parse('local key=1') [CommandNode(parts=[WordNode(parts=[] pos=(0, 5) word='local'), WordNode(parts=[] pos=(6, 11) word='key=1')] pos=(0, 11))] >>> bashlex.parse('global key=1') [CommandNode(parts=[WordNode(parts=[] pos=(0, 6) word='global'), WordNode(parts=[] pos=(7, 12) word='key=1')] pos=(0, 12))] >>> bashlex.parse('export key=1') [CommandNode(parts=[WordNode(parts=[] pos=(0, 6) word='export'), WordNode(parts=[] pos=(7, 12) word='key=1')] pos=(0, 12))]
No branches or pull requests
If an assign statement is used after local, global, and export it is treated as a word node, not an assignment node.
The text was updated successfully, but these errors were encountered: