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

Copy full path of specific element(s) ? #47

Closed
reckoner opened this issue Feb 23, 2022 · 3 comments
Closed

Copy full path of specific element(s) ? #47

reckoner opened this issue Feb 23, 2022 · 3 comments

Comments

@reckoner
Copy link

After drilling down to a specific value, is it possible to copy the full path of that value? I can see it on the status line, but I can't see how you can extract the full path.

@avioli
Copy link

avioli commented Feb 25, 2022

System Clipboard/Pasteboard support is not easy for *nix tools, that run in a shell although there is apparently a library for that (clipboard) and might not be so tricky.

For now you'll be better off to manually select the status line path yourself (in tmux copy mode or with your mouse on many terminals).

@Gee19
Copy link

Gee19 commented Feb 25, 2022

It might be a good starting point to print the path if jless was started with a certain flag like jless --printpath for example. It would also chain nicely with other unix tools and defer whatever action to perform on the result to the user.

Now bear with me because I'm already excited about this project but this could theoretically replace plugins like vim-jsonpath and be a consistent experience in the shell too.

This would also open it up to printing language specific paths like jless --printpath --lang='python' which could be piped directly into an editor with some simple shell magic. Just an idea anyway, nice project and I look forward to using it.

@PaulJuliusMartinez
Copy link
Owner

Support for copying paths is now available in the v0.8.0 release by using yp, yb or yq.

Full documentation is available by running :help inside jless, or in the user guide.

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

No branches or pull requests

4 participants