Closed bpn19 closed 10 months ago
Hi @bpn19, and thanks for reporting.
Reproduced. I'll take a look at it.
EDIT: Does this happen only with this specific plugin?
Hey @bpn19! Two plugins (img_viewer.sh
and wallpaper_setter.sh
) are fixed (replace yours with the latest versions). Still a few more remain though.
Please give them a try.
Hey @leo-arch, thanks for quick response as always. I tested wallpaper_setter
and it works no problem. However, when I try to use the new img_viewer
, I get this diagnostic:
xargs: invalid option -- d
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements] [-S replsize]]
[-J replstr] [-L number] [-n number [-x]] [-P maxprocs]
[-s size] [utility [argument ...]]
Off the top of my head, vid_viewer
was the other plugin I noticed giving me trouble with filename escaping. And for what it's worth, I also get tr: Illegal byte sequence
whenever I use vid_viewer
. Don't know whether it's worth opening another issue, I rarely use it anyway.
Lastly, although this is a bit off-topic, I noticed that there has been an open issue for a while about automated testing. I was thinking that some basic integration testing might pick up stuff like this? Due to health issues I am unable to directly contribute with e.g. pull requests etc. So these are just my thoughts. I appreciate the work that you do on this project.
Hey @bpn19, my bad. Didn't noticed you're running on FreeBSD: the Linux version of xargs
do have the -d
option, but not thus the POSIX version. Let me run a few tests on my FreeBSD box to see how to make it work there.
img_viewer
should be working now (removed GNU specific option -d
). vid_viewer
still needs to be reworked.
EDIT: vid_viewer
should be fixed now as well.
Hello @leo-arch, img_viewer
and vid_viewer
work with escaped characters now, thanks. I did notice a couple of typos in img_viewer
:
Line 39 type sxivs
should be type sxiv
Line 58 xargs -0 img2sizel
should be xargs -0 img2sixel
Thanks for pointing it out @bpn19! Fixed.
Describe the bug Cannot open files which have spaces or other special characters in their name with plugins.
To Reproduce Steps to reproduce the behavior:
img_viewer
by copying it into${XDG_CONFIG_HOME}/clifm/plugins
'filename with spaces or [other] specials'
i ELN
ori 'filename with spaces or [other] specials'
feh WARNING: filename\ with\ spaces\ or\ \[other\]\ specials does not exist - skipping
Expected behavior Using plugins via their action name should work just as if they were called explicitly.
Desktop
Additional context Invoking a plugin explicitly inside CliFM like this:
${XDG_CONFIG_HOME}/clifm/plugins/img_viewer.sh ELN
works as expected.