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

Update legacy syntax from Elvish widget #670

Merged
merged 1 commit into from
Jan 15, 2022
Merged

Update legacy syntax from Elvish widget #670

merged 1 commit into from
Jan 15, 2022

Conversation

cherryblossom000
Copy link
Contributor

This PR updates the following legacy syntax from the Elvish widget so it works on v0.17 without deprecation errors:

  • assignment: foo = barvar foo = bar or set foo = bar
  • lambdas: [arg1 arg2]{ body }{|arg1 arg2| body }; all the lambdas in the widget have no arguments so they can simply be written as { body } instead of {|| body } which coincidentally keeps the widget compatible with pre-0.17 versions

This PR also refactors some of the code so it's cleaner.


As the var and set special commands were introduced in Elvish v0.15 (January 2021), this updated Elvish widget will only work in versions 0.15 and up, so this PR is technically a breaking change.

This commit updates the legacy assignment and lambda syntax from the Elvish widget so it works on v0.17 without deprecation errors. This commit also refactors some of the code so it's cleaner.
@welcome
Copy link

welcome bot commented Jan 13, 2022

Thanks for opening this pull request!

@denisidoro
Copy link
Owner

Even though this is a breaking change, the minimum supported version is 1+ year old.

I'll assume that if a given user hasn't updated elvish in a while, they won't update navi either, so it's OK.

@denisidoro denisidoro merged commit 153d081 into denisidoro:master Jan 15, 2022
@welcome
Copy link

welcome bot commented Jan 15, 2022

Congrats on merging your first pull request!

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.

None yet

2 participants