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

Added writing query and content to clipboard #46

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

anton-suprun
Copy link
Contributor

@anton-suprun anton-suprun commented Jun 8, 2024

Description

  • Addresses issue: Feature Request: Copy current JSON displayed #27

  • Added two methods to Jnv

    • content_to_clipboard - writes currently visible json to clipboard and adds a hint that content was copied to clipboard
    • query_to_clipboard - writes current jq query to clipboard and adds a hint that the query was copied to clipboard
  • Added two new shortcuts:

    • ctrl-o - copies content to clipboard
    • ctrl-q - copies query to clipboard

Screencasting

Note: I have a clipboard manager (via Raycast); that's the pop-up you're seeing; I use it to show the latest copied text

Screen.Recording.2024-07-24.at.11.18.54.PM.mov

Notes

Please feel free to request any changes to code structure, shortcuts, etc. I am happy to receive any of your feedback on this 😊
Dependency promkit PR

Resolves #27

Cargo.toml Outdated
jaq-core = "1.2.1"
jaq-interpret = "1.2.1"
jaq-parse = "1.0.2"
jaq-std = "1.2.1"
promkit = "0.4.3"
promkit = { path = "/Users/antonsuprun/Projects/promkit/promkit" }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: will remove this once it's ready to merge

@anton-suprun
Copy link
Contributor Author

@ynqa

Thanks again for your suggestion on the promkit change; let me know if you have any other suggestions :)

(Once again; apologies for the delay on this 🙏 )

@ynqa
Copy link
Owner

ynqa commented Aug 5, 2024

@anton-suprun LGTM! But please merge until promkit release (and edit the version after confirming release) 🙇

@anton-suprun
Copy link
Contributor Author

@anton-suprun LGTM! But please merge until promkit release (and edit the version after confirming release) 🙇

Thank you 😃 ! And yes, acknowledged. Will do that !

@ynqa
Copy link
Owner

ynqa commented Aug 5, 2024

@anton-suprun And also, please add the items about new key-bindings to https://github.com/ynqa/jnv/blob/main/README.md?plain=1#L96-L118.

@ynqa
Copy link
Owner

ynqa commented Aug 5, 2024

@anton-suprun I just released promkit as v0.4.5 🎉

@anton-suprun
Copy link
Contributor Author

@anton-suprun I just released promkit as v0.4.5 🎉

Awesome!!
Will update this shortly 😁 (on mobile right now )

@anton-suprun anton-suprun changed the title [work-in-progress] Added writing query and content to clipboard Added writing query and content to clipboard Aug 5, 2024
Copy link
Owner

@ynqa ynqa left a comment

Choose a reason for hiding this comment

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

LGTM! @anton-suprun Thanks for your contribution~ 👍

@ynqa ynqa merged commit b490813 into ynqa:main Aug 6, 2024
6 checks passed
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.

Feature Request: Copy current JSON displayed
2 participants