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

Fix parsing long flag #56

Merged
merged 4 commits into from
Jan 3, 2024
Merged

Conversation

kit494way
Copy link
Contributor

Fix #54

======

def test [
--long-flag (-l)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this require a space or will it parse like --long-flag(-l)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A space is not required.

@fdncred
Copy link
Collaborator

fdncred commented Jan 3, 2024

Looks good but what about this type of flags?

def test [
  --long-flag(-l): int
] {}

@kit494way
Copy link
Contributor Author

I will add more tests.

@kit494way
Copy link
Contributor Author

I added some tests.
I also fixed a same bug in a rule for long flags in command arguments.

@fdncred
Copy link
Collaborator

fdncred commented Jan 3, 2024

thanks! i'm really enjoying all these fixes/additions. keep up the great work!

@fdncred fdncred merged commit 958ccfb into nushell:main Jan 3, 2024
3 checks passed
@kit494way kit494way deleted the fix-parsing-long-flag branch February 3, 2024 06:11
mrdgo pushed a commit to mrdgo/tree-sitter-nu that referenced this pull request Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect parsing for long param flag with dashes
2 participants