Using this
command! quitMenu
\ :quit
terminates vifm
which is not exactly what I want (I want to run the command in the context of shown menu). As a workaround I am using
command! quitMenu
\ :quitMenu
Which produces an error message about loop in commands but otherwise does the job. I am aware of a way to cancel that menu via key binding but in my use case I don't have such option.