Created
June 13, 2013 22:52
-
-
Save phx/5778095 to your computer and use it in GitHub Desktop.
(osx version) when copied to ~/.bashrc or ~/.bash_profile, will create 'Ctrl + ]' keyboard shortcut, allowing *current* (not necessarily last) terminal command to be copied to the gui clipboard via pbpaste.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| bind '"\C-]":"\C-e\C-u pbcopy <<"EOF"\n\C-y\nEOF\n"' | |
| # i might try: | |
| # $ echo 'bind \'"\C-]":"\C-e\C-u pbcopy <<"EOF"\n\C-y\nEOF\n"\'' >> ~/.bash_profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment