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

feat: allow equals sign in aliased parameter values. #2755

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dpnova
Copy link

@dpnova dpnova commented May 16, 2024

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Proposal to allow aliased parameter values to contain an equals sign. for example, something like: -c formula=x=1+1

An alternative could be to have a way to escape the value, though that opens a shell can of worms.

Opening this as a draft as a way to get comments before I go and dig into the failing tests this causes. (I realise some may disagree with this change)

Copy link

changeset-bot bot commented May 16, 2024

⚠️ No Changeset found

Latest commit: b5c72f1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gcanti gcanti added the cli label May 16, 2024
@@ -1193,7 +1193,7 @@ const parseInternal = (
const extractKeyValue = (
value: string
): Effect.Effect<[string, string], ValidationError.ValidationError> => {
const split = value.trim().split("=")
const split = value.trim().split("=", 1)
Copy link
Member

Choose a reason for hiding this comment

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

Should this not be .split("=", 2) so we get the [key, value] tuple back?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Discussion Ongoing
Development

Successfully merging this pull request may close these issues.

None yet

3 participants