Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin rsync and only one file (selected or hovered) doesn't work #1

Open
xfzv opened this issue Aug 17, 2024 · 1 comment
Open

plugin rsync and only one file (selected or hovered) doesn't work #1

xfzv opened this issue Aug 17, 2024 · 1 comment

Comments

@xfzv
Copy link

xfzv commented Aug 17, 2024

With:

[[manager.prepend_keymap]]
on = ["R"]
run = "plugin rsync"
desc = "Copy files using rsync"

If I select multiple files and press R: no issue, the prompt is showing up and I can manually type [user]@[remote]:<destination>.

However, if I select only one file or hover a file and press R, the task is stuck at 99% and the following error is displayed in task manager:

Micro plugin failed:
runtime error: [string "rsync"]:33: attempt to concatenate a nil value (local 'remote_target')
stack traceback:
	[string "rsync"]:33: in function <[string "rsync"]:21>

Note that

[[manager.prepend_keymap]]
on = ["R"]
run = "plugin rsync --args='[email protected]'"
desc = "Copy files using rsync to default location"

works just fine even if selecting/hovering a single file.


% cat /etc/os-release
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
VERSION_ID="2.15"

% yazi -V
Yazi 0.3.1 (99a3b3a 2024-08-16)

% rsync --version
rsync  version 3.3.0  protocol version 31
@GianniBYoung
Copy link
Owner

I'll take a look at this when I get a chance.

I have seen issues with the command failing or expecting input and the task not terminating so there should be some improvements made to handle cases like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants