-
Notifications
You must be signed in to change notification settings - Fork 172
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: Key-binding to copy highlighted command to system clipboard #226
Comments
That's a nice feature idea, thanks @arijit-hal |
I would like to claim this one and try to figure it out. What is the preferred end of action for this command? For example, after the user press the keybinding to copy the selected text, should the user stay in McFly or exit out? |
Ah nice follow up question! It would probably be preferable to stay within McFly after the selected content has been copied to the clipboard. This way once the user has pasted the copied content into their desired application, they can initiate another search and repeat the process if needed. |
That makes sense. |
That's what I was thinking. On top of that, say the user copies the wrong command. It would be annoying to restart the application and then find the desired command again. I know I would find that annoying. |
For the keybindings, I am thinking of using 'yy' if the user is using vim mode, since in vim that will copy the whole line. I am not an emacs user but an article I read says to use Ctrl+k to copy a line. However, Ctrl+k already has a keybinding. Any recommendations for keybindings for emacs? Or any keybinding recommendations to keep it the same for both emacs and vim? |
I agree with the choice of 'yy' in vim mode. In the "usual" bash-like mode Ctrl+k should have been a good choice as it is the default for cutting a typed command in the bash shell from cursor till the end. If that does not work, I suggest Ctrl+i kind of hybrid between vim and Ctrl+k and short for "insert" into clipboard buffer or Ctrl+y if that can be used while inside McFly. Alternatively, setting custom keybindings through environment variables could also be another option. |
@cantino after doing some research, there is no clear way on copying text to clipboard using Rust's std lib. However, there is a crate that implements this functionality. How would you feel about using it? |
Seems like a reasonable crate. But, given the lack of sufficient knowledge about rust-crates I would like to get @cantino 's opinion. |
Given its use in Mozilla Servo, I'm comfortable adding it. |
Hi,
Is there a way to add a keybinding to copy a highlighted command from mcfly's heads-up display directly to the system clipboard? Presently, the only way I can achieve this consistently across several terminal emulators (kitty, gnome-terminal etc.) is by using the edit option (pressing TAB) and then copying the result into the emulator's internal buffer (using Ctrl+U).
Thanks!
The text was updated successfully, but these errors were encountered: