Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metaory/xyank
build, execute or pass standard input and arguments to clipboard
https://github.com/metaory/xyank
cli clipboard command command-line copy copy-to-clipboard xargs xclip xsel yank
Last synced: 15 days ago
JSON representation
build, execute or pass standard input and arguments to clipboard
- Host: GitHub
- URL: https://github.com/metaory/xyank
- Owner: metaory
- License: mit
- Created: 2024-02-24T17:50:04.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-03-09T23:47:46.000Z (4 months ago)
- Last Synced: 2024-03-10T00:33:43.331Z (4 months ago)
- Topics: cli, clipboard, command, command-line, copy, copy-to-clipboard, xargs, xclip, xsel, yank
- Language: Shell
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-stars - metaory/xyank - build, execute or pass standard input and arguments to clipboard (Shell)
README
XYANK
=====```ex
NAME
xyank - format, build, execute, pass standard input and arguments to clipboardSYNOPSIS
[CMD... |] xyank X|Y [STR...]DESCRIPTION
modes: `x|X` for execute, `y|Y` for yank onlyEXAMPLES
# yank arguments to clipboard
xyank Y date foo # date foo# yank stdin to clipboard
date | xyank y # Sun Feb 25 00:00:00 AM +00 2024# yank stdin + arguments
date | xyank Y foo bar # Sun Feb 25 00:00:00 AM +00 2024 foo bar# execute argument & yank its stdout to clipboard
xyank X date # Sun Feb 25 00:00:00 AM +00 2024# execute stdin & yank its stdout to clipboard
echo date | xyank X # Sun Feb 25 00:00:00 AM +00 2024# execute stdin + arguments & yank its stdout to clipboard
echo date | xyank X '+%s' # 1708796381ENVIRONMENT VARIABLES
XYANK_SILENT Silent Query & Result printsSEE ALSO
yank(1), xsel(1), xset(1), xclipboard(1), xpaste(1)AUTHOR
metaory , Feb 2024
```CONFIGURATION
-------------```ex
# to silent outputs
# export XYANK_SILENT=1# ALIASES
alias -g YY='| xyank Y'
wc -l README.md YY # 99 README.mdalias -g YX='| xyank X'
echo wc -l YX README.md # 99 README.mdalias yy='xyank Y'
wc -l | yy # 99 README.md
yy wc -l README.md # wc -l README.mdalias yx='xyank X'
yx wc -l README.md # 99 README.md
```Modes
-----
- `y|Y`: yank stdin, args to system clipboard
- `x|X`: execute stdin, args & yank output to system clipboardInstallation
------------- clone repo
- give execution permissions
- place it in your path```ex
# Clone the repo
git clone [email protected]:metaory/xyank.git# Navigate to repo
cd xyank# Give execution permissions
chmod +x xyank# Link it somewhere in your PATH
ln -sfv xyank /usr/bin/xyank# Use it anywhere
# Usage
xyank --help
```TODO
====
- [ ] Makefile