fix usage
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kim Oliver Drechsel 2021-09-21 21:24:04 +02:00
parent 7f5487fc8d
commit ba0a349e10

View File

@ -22,8 +22,7 @@ trash_list() {
} }
trash_put() { trash_put() {
echo "$FUNCNAME" usage "$#" "trash_put"
usage "$#" "${FUNCNAME[0]}"
for FILE in $@; do for FILE in $@; do
# Store old filepath for later restore # Store old filepath for later restore
@ -38,7 +37,7 @@ trash_empty() {
} }
trash_restore() { trash_restore() {
usage "$#" "${FUNCNAME[0]}" usage "$#" "trash_restore"
for FILE_TO_RESTORE in "$@"; do for FILE_TO_RESTORE in "$@"; do
# Get old filepath for restore # Get old filepath for restore
@ -53,8 +52,7 @@ trash_restore() {
} }
trash_rm() { trash_rm() {
usage "$#" "${FUNCNAME[0]}" usage "$#" "trash_rm"
#if [[ $# == 0 ]]; then echo -e "At least one argument required:\n$0 FILE1 DIR2 ..."; return 1; fi
for FILE_TO_REMOVE in "$@"; do for FILE_TO_REMOVE in "$@"; do
if ! echo "$FILE_TO_REMOVE" | grep "$HOME/.trash" if ! echo "$FILE_TO_REMOVE" | grep "$HOME/.trash"