count args correctly

This commit is contained in:
Ville Rantanen
2021-07-28 12:37:46 +03:00
parent b5e3f9e4c5
commit 99af6f6cbb

View File

@@ -118,7 +118,7 @@ _copy() {
if [[ $# -lt 2 ]]; then if [[ $# -lt 2 ]]; then
_help _help
fi fi
for i in $@; do :; done for i in "$@"; do :; done
if [[ ! -e "$i" ]]; then if [[ ! -e "$i" ]]; then
CLIPBOARD=$( echo "$i" | tr -d './' | tr -cd '[[:print:]]' ) CLIPBOARD=$( echo "$i" | tr -d './' | tr -cd '[[:print:]]' )
if [[ -z "$CLIPBOARD" ]]; then if [[ -z "$CLIPBOARD" ]]; then