commit 4ddd048febef9e9098c8f5a19837a38c776b538b
parent fd998b3045fbc8ef3a97d2f55a80781725f76919
Author: Patrick <patrickf3139@gmail.com>
Date: Fri, 29 Apr 2022 15:50:47 -0700
.cbcp plugin: output a more useful error message
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git 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