Custom move and copy command works in terminal but not in lf subshell #1574
-
Hi, I followed some instructions to setup custom copy and move commands to preserve file attributes (like timestamps) with
But this still does not work, especially if files or directories contain special characters like spaces. However the arguments are escaped properly and I can simply copy the command from my made-up logfile and execute it and it will work just fine. But it does not from the subshell of lf. Debugging there brings error messages like:
The line from my log will say something like this:
and I can copy the As mentioned Any ideas what could cause this issue? lf: 31 Kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think it's because I changed the line at the top to just |
Beta Was this translation helpful? Give feedback.
I think it's because
$@
is already an array (where elements can contain spaces), so there is no need to use"$(printf '%q' $line)"
. Do soing ends up adding a literal backslash into the array element and results in a 'no such file' error because now the filename actually contains\
.I changed the line at the top to just
set -- "$@" "$line"
and the script works for me.