clipdel: Give more helpful message if we didn't provide a pattern

This commit is contained in:
Chris Down 2018-04-22 10:17:49 +01:00
parent 8388a00ab3
commit 7f06b56775

View file

@ -44,6 +44,11 @@ fi
raw_pattern=${@: -1}
esc_pattern=${raw_pattern/\#/'\#'}
if ! [[ $raw_pattern ]]; then
printf '%s\n' 'No pattern provided, see --help' >&2
exit 2
fi
exec {lock_fd}> "$lock_file"
if (( CM_REAL_DELETE )) && [[ "$raw_pattern" == ".*" ]]; then