diff options
author | 2019-06-16 22:21:13 +0530 | |
---|---|---|
committer | 2019-06-17 07:04:42 +0530 | |
commit | 794a0e27091b63f997fc829d0288cde5a4a2edbd (patch) | |
tree | 384695218b8cf09700df81715627004124e0edf7 /misc/clipboard-copier/copier | |
parent | aa56b99326a12f5bbab6d5a693755060e81e44a2 (diff) | |
download | nnn-794a0e27091b63f997fc829d0288cde5a4a2edbd.tar.gz |
Move scripts to misc
Diffstat (limited to 'misc/clipboard-copier/copier')
-rwxr-xr-x | misc/clipboard-copier/copier | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/misc/clipboard-copier/copier b/misc/clipboard-copier/copier new file mode 100755 index 0000000..e20dcf4 --- /dev/null +++ b/misc/clipboard-copier/copier @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +# Description: Copy selection to clipboard +# +# Shell: POSIX compliant +# Author: Arun Prakash Jana + +SELECTION=~/.config/nnn/.selection + +# Linux +cat "$SELECTION" | xargs -0 | xsel -bi + +# macOS +# cat "$SELECTION" | xargs -0 | pbcopy + +# Termux +# cat "$SELECTION" | xargs -0 | termux-clipboard-set + +# Cygwin +# cat "$SELECTION" | xargs -0 | clip |