#!/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