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

Open response body in pager #404

Closed
ttytm opened this issue Oct 21, 2024 · 3 comments · Fixed by #414
Closed

Open response body in pager #404

ttytm opened this issue Oct 21, 2024 · 3 comments · Fixed by #414
Labels
feature New behavior to enable things that were previously not possible

Comments

@ttytm
Copy link

ttytm commented Oct 21, 2024

Feature Description

Similar how the Edit Collection action opens the collection file in an editor, it would be great to have the ability to open a body in a pager which can be specified via the config or an environment variable.

For example, what I'm current getting from https://github.com/antonmedv/fx is the ability regexp-search in a body - independently of knowing it's keys - and to get further information about it's contents - like sizes of objects and arrays.

Ref.:
Screenshot_20241022_001203

It also allows for folding, which is related to providing a solution for #398

Features like this might become native in slumber one day. Until then users wouldn't have to make compromises when having the possibility of using an additional viewer directly from within slumber.

Additional Context

For example the posting python project allows to specify a regular pager, and a json_pager.

@ttytm ttytm changed the title Open in response body in pager Open response body in pager Oct 21, 2024
@LucasPickering LucasPickering added the feature New behavior to enable things that were previously not possible label Oct 23, 2024
@LucasPickering
Copy link
Owner

I love this idea, also fx looks great and I'm gonna start using it. This shouldn't be too hard since we can reuse the machinery for opening in an editor. I'll get started on it soon.

@LucasPickering
Copy link
Owner

@ttytm I have an initial implementation merged to master. I'd like to get someone else's hands on it before releasing though. Do you mind trying it out? In your config file you can set viewer: fx, similar to the editor command.

I didn't support per-language viewers yet, but deifnitely plan to. I just wanted to get an initial version out before jumping back onto some previous work.

@ttytm
Copy link
Author

ttytm commented Nov 8, 2024

Sorry the delay @LucasPickering,

I had checked out the PR branch and used it as soon as I have seen it.
IMHO it's already a very useful feature as it is. Thanks for the efforts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New behavior to enable things that were previously not possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants