.cbcp plugin: output a more useful error message

This commit is contained in:
Patrick 2022-04-29 15:50:47 -07:00 committed by Arun Prakash Jana
parent fd998b3045
commit 4ddd048feb
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -22,6 +22,7 @@
IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}" # protect trailing \n IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}" # protect trailing \n
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection} 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 if type xsel >/dev/null 2>&1; then
# Linux # Linux