fix paste not working

This commit is contained in:
Ray Elliott 2021-09-22 10:22:42 +01:00
parent 966946130e
commit 3bdc9a62c1
1 changed files with 0 additions and 18 deletions

18
lfrc
View File

@ -115,21 +115,3 @@ cmd thumbs ${{
feh -t -y128 -E128 & feh -t -y128 -E128 &
fi fi
}} }}
# TODO test this
cmd paste &{{
load=$(lf -remote 'load')
mode=$(echo "$load" | sed -n '1p')
list=$(echo "$load" | sed '1d')
if [ $mode = 'copy' ]; then
rsync -av --ignore-existing --progress $list . \
| stdbuf -i0 -o0 -e0 tr '\r' '\n' \
| while read line; do
lf -remote "send $id echo $line"
done
elif [ $mode = 'move' ]; then
mv -n $list .
fi
lf -remote 'send load'
lf -remote 'send clear'
}}