mirror of
https://github.com/jarun/nnn.git
synced 2024-08-20 06:23:00 +00:00
21 lines
383 B
Bash
Executable file
21 lines
383 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
# Description: Copy selection to clipboard
|
|
#
|
|
# Shell: POSIX compliant
|
|
# Author: Arun Prakash Jana
|
|
|
|
SELECTION=${XDG_CONFIG_HOME:-$HOME/.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
|