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

Let user copy the result of the preview command or other target command to clipboard #297

Open
bada-bing opened this issue Jan 20, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@bada-bing
Copy link

bada-bing commented Jan 20, 2025

Problem
In certain scenarios, the user is more interested in the preview value than the actual "source" value and would like to have an easy access to it.

Feature
The cable_channels could offer a target_command (for the lack of better name) where the user could provide a custom command for the copy to clipboard.
If no custom command is provided, the "alternative" copy to clipboard command would be "preview_command".
This feature should not replace the main "copy to clipboard" but complement it, and it should have its own keybinding.
The provided examples describe the desired functionality.

Examples

  1. Let's say that I have a certain API token saved as env variable. I need to paste this api token into other (gui) application, e.g., to configure some raycast extension. I don't care about the name of the variable but the associated value.
  2. Similarly, let's say that I have some kind of a key-value store. For example a file which has lines such as phone:<the-actual-phone-number>. I want to copy the actual phone number (not the phone key).
  3. When working with the tv git-log I would like to be able to search for a commit and to be able to copy the commit's hash (or the message) using a single keybinding.

Forgot to add: thanks a lot for a very useful and cool utility tool! 👨‍🚀

@bada-bing bada-bing added the enhancement New feature or request label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant