diff --git a/plugins/.cbcp b/plugins/.cbcp index 3a71927e..70f9b75c 100755 --- a/plugins/.cbcp +++ b/plugins/.cbcp @@ -22,6 +22,7 @@ IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}" # protect trailing \n selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection} +[ -s "$selection" ] || { echo "plugin .cbcp error: empty selection" >&2 ; exit 1; } if type xsel >/dev/null 2>&1; then # Linux