mirror of
https://github.com/jarun/nnn.git
synced 2024-11-04 18:33:12 +00:00
24 lines
414 B
Bash
Executable file
24 lines
414 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
|
|
xargs -0 < "$SELECTION" | xsel -bi
|
|
|
|
# macOS
|
|
# xargs -0 < "$SELECTION" | pbcopy
|
|
|
|
# Termux
|
|
# xargs -0 < "$SELECTION" | termux-clipboard-set
|
|
|
|
# Cygwin
|
|
# xargs -0 < "$SELECTION" | clip
|
|
|
|
# Wayland
|
|
# xargs -0 < "$SELECTION" | wl-copy
|