As I see, in vifm, we can't have functions in a config file in order to call those later with custom commands or mappings, as we can do with Vim, is that right?
Correct. There are no functions at the moment. And I'm somewhat hesitant to add them as people might start doing crazy things in a not so well defined language.
Someone proposed using Lua for the language. I didn't like the idea at the time, but maybe it would really be better to add it with an API to call vifm's functions and get lots of things for free. This would sort of keep complicated stuff away from builtin language.
And if I want to introduce a command, which is a bit more complex than a few pipes, I have no choice but to put that into a custom shell script
If it's essentially a shell script, then yes and functions wouldn't be of much help. It would still have to be a single (possibly multiline) invocation of
and then to place that script somewhere in the $PATH, right?
:cd $VIFM/scripts inside vifm and put vifm-specific scripts there to not have them in
$PATH outside vifm.