antonmedv / fx

Terminal JSON viewer & processor
https://fx.wtf
MIT License
19.08k stars 438 forks source link

Feature Request: Provide keyboard shortcut to copy a value #260

Closed vdobler closed 1 year ago

vdobler commented 1 year ago

Copying values in interactive mode with the mouse is possible but a bit cumbersome. It would be very convenient if (leave) values could be copied to the clipboard with a keystroke. E.g

"foo": "some value"
‾‾‾‾‾    

With the ‾‾‾ marking the highlighted element, a keypress of e.g. y or Ctrl-c could copy some value to the clip board.

Rational: I often use fx to look up some value in a JSON, e.g. for debugging purpose and extracting values during interactive use is cumbersome.

(For compound values (arrays, objects) this might be not implemented or copy the whole compound thing; not really a use case for me.)

antonmedv commented 1 year ago

Added! yy yp yk