Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by

If I need a value returned from function system() I call it like this:

let $MY_VAR = system('echo value')

But if I don't need a value return from a function, this code fragment doesn't work as expected:

system('echo value')

And I have to use some phony variable I will never use just to call a function:

let $MY_VAR = system(<run some code with side effects in the system>)

Is there any way to call a function without using a phony variable?

1 Answer

0 votes
by
 
Best answer

If you don't need the result, you can use :! (possibly wrapped in :execute). Vim uses :call for this, but given much more limited set of functions in Vifm, there is no :call.

...