nvimpager fails when executed without options in a script
Closed this issue · 5 comments
I have a script:
#!/bin/sh
exec nvimpager -p -- "$@"
It works, but when I remove -p
, nvimpager fails:
Error detected while processing VimEnter Autocommands for "*":
E5108: Error executing lua /usr/share/nvimpager/runtime/lua/nvimpager.lua:147: attempt to call upvalue 'color2escape' (a nil value)
stack traceback:
/usr/share/nvimpager/runtime/lua/nvimpager.lua:147: in function 'group2ansi'
/usr/share/nvimpager/runtime/lua/nvimpager.lua:161: in function 'init_cat_mode'
/usr/share/nvimpager/runtime/lua/nvimpager.lua:297: in function 'cat_mode'
[string ":lua"]:1: in main chunk
and prints nothing.
I can not reproduce this. Can you tell me which version of nvimpager you have and how you are calling your script?
My nvimpager is nvimpager v0.10.4-18-g7a0b5dd
, installed from AUR as nvimpager-git
I can run ls | nvimpager
and get the error.
P.S. So mentioning of the script was redundant, I get the error using just /usr/bin/nvimpager
P.P.S. I have been using my script with nvimpager -p
for a long time and cannot confirm whether the error was present all that time or not.
Your version is from 2022-01,can you please update to the newest version.
My bad, I have assumed that the package was the latest version. I will try the new version and post the result.
Yep, the problem went away. Thanks for helping out.