lf icon indicating copy to clipboard operation
lf copied to clipboard

map to script suddenly not working

Open jythub opened this issue 2 years ago • 2 comments

As described above : map gF setfilterarg also have for same script because of problem, added: map g8 setfilterarg in lfrc map gF setfilterarg cmd setfilterarg ${{ echo "setFilter --> " read ft lf -remote "send $id setfilter $ft" }} suddenly not working!? works great, many times, and then never works again!?

jythub avatar Mar 06 '23 19:03 jythub

I do not understand the issue. setfilter works as I would expect it to work (like you used it from remote). As I understand it, setfilter just takes the argument and then applies it.

map gF filter looks like it is doing the same thing as your command as it is starting the prompt.

DusanLesan avatar Mar 07 '23 03:03 DusanLesan

I would recommend you check if you have more than one lfrc, and make sure all your functions are the same in all config files. I have had similar issues in the past (things stop working from seemingly nowhere) and some of those issues was due to conflicting config files. Compare your ~/.config/lf/lfrc files for all users and /etc/lf/lfrc, make sure your functions is stated the same way in all of them.

Joyje avatar Apr 03 '23 05:04 Joyje

Can't reproduce, the following example works for me:

map f %{{
    printf "setfilter: "
    read pattern
    lf -remote "send $id setfilter '$pattern'"
}}

Though you are probably better off just using filter like below:

map f filter

joelim-work avatar Mar 26 '24 10:03 joelim-work