clipdel: Give more helpful message if we didn't provide a pattern
This commit is contained in:
parent
8388a00ab3
commit
7f06b56775
5
clipdel
5
clipdel
|
@ -44,6 +44,11 @@ fi
|
||||||
raw_pattern=${@: -1}
|
raw_pattern=${@: -1}
|
||||||
esc_pattern=${raw_pattern/\#/'\#'}
|
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"
|
exec {lock_fd}> "$lock_file"
|
||||||
|
|
||||||
if (( CM_REAL_DELETE )) && [[ "$raw_pattern" == ".*" ]]; then
|
if (( CM_REAL_DELETE )) && [[ "$raw_pattern" == ".*" ]]; then
|
||||||
|
|
Loading…
Reference in a new issue