Giter VIP home page Giter VIP logo

Comments (13)

antonmedv avatar antonmedv commented on July 19, 2024 12

You can also do on macos this:

pbpaste | fx | pbcopy

from fx.

venikman avatar venikman commented on July 19, 2024 5

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 .

from fx.

antonmedv avatar antonmedv commented on July 19, 2024 1

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

from fx.

venikman avatar venikman commented on July 19, 2024 1

Sorry didn't mean to close, misliked.

from fx.

Glad3nU73r avatar Glad3nU73r commented on July 19, 2024 1

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

from fx.

from-nibly avatar from-nibly commented on July 19, 2024 1

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.

from fx.

aksh1618 avatar aksh1618 commented on July 19, 2024 1

@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.

from fx.

antonmedv avatar antonmedv commented on July 19, 2024 1

Please, open new one ☝🏻

from fx.

antonmedv avatar antonmedv commented on July 19, 2024

What is it?

from fx.

TheUnforgiven72 avatar TheUnforgiven72 commented on July 19, 2024

from fx.

venikman avatar venikman commented on July 19, 2024

Hm, looks like spam??

from fx.

antonmedv avatar antonmedv commented on July 19, 2024

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

from fx.

ditsuke avatar ditsuke commented on July 19, 2024

@antonmedv can this issue be reopened please?

from fx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.