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

Feature request: Copy result to clipboard. #69

Closed
venikman opened this issue Jan 21, 2019 · 13 comments
Closed

Feature request: Copy result to clipboard. #69

venikman opened this issue Jan 21, 2019 · 13 comments

Comments

@venikman
Copy link

Maybe that feature exists but It would be great if users could copy their search results or some fields to clipboard. I know about the ability to select but it now what I want

@antonmedv
Copy link
Owner

Can you show an example of usage? Or maybe there is some other cli apps with this feature?

@venikman
Copy link
Author

venikman commented Jan 21, 2019

I have cli app that console.log(someJSON). But it very simple. I can of course use something like child_process.exec('fx someJSON') . But would be neat to have native support here.
Something like:

const fx = require('fx');

const json = {
    foo : 'bar',
    baz : {
       test : 123
   }
};
fx(json).copy();

And for copy have some flag --copy so it will copy whole result if you dot ., $ curl ... | fx .

@venikman venikman reopened this Jan 25, 2019
@venikman
Copy link
Author

Sorry didn't mean to close, misliked.

@antonmedv
Copy link
Owner

You can also do on macos this:

pbpaste | fx | pbcopy

@antonmedv
Copy link
Owner

What is it?

@TheUnforgiven72
Copy link

TheUnforgiven72 commented Jan 29, 2019 via email

@Glad3nU73r
Copy link

Well I'm not sure what we are looking at but smells like encypted snap-like output.
Try 'snap' out of it ())+_-)
Get SNAP application but hold your horses, it's slightly different to all that I've used.
~$ 'snap info snap
(if you need more verbosely shell -- try 'fish' - friendly interface shell to learn what possible outputs you got)
type 'fish' and then manage others. After that 'exit' to get back in whaever shell u r using.

~$ snap refresh
~$ snap install APP_NAME --stable
~$ snap list --all
~$ snap remove (if new revision appear-old gets disabled) APP_NAME --revision NUMBER

@venikman
Copy link
Author

Hm, looks like spam??

Repository owner deleted a comment Feb 25, 2019
@from-nibly
Copy link

On linux you can just do

xclip -selection clipboard -o | fx | xclip -selection c

It's a little more verbose but you can just set up aliases in your bashrc for pbcopy and pbpaste. I don't think fx should be in charge of handling your clipboard when you can just use bash.

Repository owner deleted a comment from ally308 Apr 5, 2019
@aksh1618
Copy link

aksh1618 commented May 4, 2020

@antonmedv I have encountered a relevant use case: I make a request using curl and directly pipe it to fx. If the result matches a criteria, I want to copy it for further use. But currently I have to quit fx and make the request again to pipe to something like xclip. Shortcuts like y & Y to copy the json in the interactive mode would be much more convenient in this case than having to wait for the response again (if that is even an option, in case of limits) or having to select it manually from terminal output using P.

@antonmedv
Copy link
Owner

Okay, does some one what to create pr with it?

@ditsuke
Copy link

ditsuke commented May 28, 2022

@antonmedv can this issue be reopened please?

@antonmedv
Copy link
Owner

Please, open new one ☝🏻

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

7 participants