Minor comment cleanup, use $@ instead of $* for input checking
This commit is contained in:
parent
04aade74eb
commit
8c064a13b2
@ -1,7 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# quickdel - delete any file matching a query
|
## quickdel - delete any file matching a query
|
||||||
# Dependencies:
|
## Dependencies:
|
||||||
# fd
|
## * bash
|
||||||
|
## * fd
|
||||||
|
|
||||||
printHelp() {
|
printHelp() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@ -65,7 +66,7 @@ while true; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Prevent fd from selecting everything
|
# Prevent fd from selecting everything
|
||||||
[[ -z "${*}" ]] && printf '%s\n' "No queries entered, cancelling" >&2 && exit 1
|
[[ -z "${@}" ]] && printf '%s\n' "No queries entered, cancelling" >&2 && exit 1
|
||||||
|
|
||||||
for pattern in "${@}"; do
|
for pattern in "${@}"; do
|
||||||
while IFS= read -r -d '' file; do
|
while IFS= read -r -d '' file; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user