1
0
Fork 0

stop using rsync for pasting

This commit is contained in:
Luca Bilke 2022-08-09 18:51:10 +02:00
parent e772161cbb
commit 06b28b4206
1 changed files with 17 additions and 17 deletions

View File

@ -133,23 +133,23 @@ cmd on-quit ${{
printf "\033]0; $DIR\007" > /dev/tty
}}
cmd paste &{{
set -- $(cat ~/.local/share/lf/files)
mode="$1"
shift
case "$mode" in
copy)
rsync -av --ignore-existing --progress -- "$@" . |
stdbuf -i0 -o0 -e0 tr '\r' '\n' |
while IFS= read -r line; do
lf -remote "send $id echo $line"
done
;;
move) mv -n -- "$@" .;;
esac
rm ~/.local/share/lf/files
lf -remote "send clear"
}}
# cmd paste &{{
# set -- $(cat ~/.local/share/lf/files)
# mode="$1"
# shift
# case "$mode" in
# copy)
# rsync -av --ignore-existing --progress -- "$@" . |
# stdbuf -i0 -o0 -e0 tr '\r' '\n' |
# while IFS= read -r line; do
# lf -remote "send $id echo $line"
# done
# ;;
# move) mv -n -- "$@" .;;
# esac
# rm ~/.local/share/lf/files
# lf -remote "send clear"
# }}
cmd share $curl -F"file=@$fx" https://0x0.snaile.de | xclip -r -selection c