Last active
September 18, 2019 13:58
-
-
Save rubencabrera/dc461de1a0cf9bd1dc3e1bbca23b8bbc to your computer and use it in GitHub Desktop.
Xclip aliases (requires xclip installed)
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 | |
echo 'alias "c=xclip"' >> ~/.bashrc | |
echo 'alias "v=xclip -o"' >> ~/.bashrc | |
echo 'alias "cs=xclip -selection clipboard"' >> ~/.bashrc | |
echo 'alias "vs=xclip -o -selection clipboard"' >> ~/.bashrc |
For example, if you want the output of a command (e.g. echo
) to be copied to your selection clipboard (the one you paste using Ctrl+V), you can do:
echo "the output of a command" | cs
To get what's on your selection clipboard (things you copied with Ctrl+C) and pipe it to a command (e.g. base64
):
vs | base64
pbcopy/pbpaste can be used for the same sort of thing on mac
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bash aliases to handle clipboard