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: handle special characters in select flag #341

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

reubenmiller
Copy link
Owner

@reubenmiller reubenmiller commented Jan 18, 2024

Fix a bug where the path provided by the --select flag would not handle paths with special characters such as @|#?*.

See tests for more details.

Resolves #340

Example

echo '{"with@at":"one","with#hash":"two","with|pipe":"three","with*star":"four","with?questionmark":"five"}' |
        c8y util show --select "with@at,with#hash,with|pipe,with\*star,with?questionmark" -o json

Now outputs the following (instead of {}):

{
  "with#hash": "two",
  "with*star": "four",
  "with?questionmark": "five",
  "with@at": "one",
  "with|pipe": "three"
}

@reubenmiller reubenmiller force-pushed the fix-special-json-props branch from 9fed9ba to 1e44f79 Compare January 18, 2024 20:28
@reubenmiller reubenmiller merged commit 5e37c2b into v2 Jan 18, 2024
4 checks passed
@reubenmiller reubenmiller deleted the fix-special-json-props branch January 18, 2024 20:43
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.

properties with @ in their names are not selectable
1 participant