-
-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
When passing messages to xplr from the command line through the -m flag, the order I pass in messages does not have any effect on execution order.
For a minimal example, try calling a custom function that changes some state based on the current vroot, then setting the vroot.
local past_vroot = nil
xplr.fn.log_vroot = function (app)
past_vroot = app.vroot
end
... some sort of code that changes the dispplay based on `past_vroot`note: It seems like lua functions that are called this way have their return messages ignored?
xplr -m "CallLua: log_vroot"
xplr -m "SetVroot: /arbitrary/path"However, it will always set the vroot first, then call the lua function. The same happens if they are in reverse order.
I have also tried:
xplr -m "CallLua: log_vroot" -m "SetVroot: /arbitrary/path"
# error: xplr -m: too many positional values, not enough positional placeholders
xplr -m "CallLua: log_vroot"
xplr -m "Refresh"
xplr -m "SetVroot: /arbitrary/path"
# no difference
xplr -m "CallLua: log_vroot"
sleep 5
xplr -m "SetVroot: /arbitrary/path"
# no difference
xplr -m "[CallLua: log_vroot, SetVroot: /arbitrary/path]"
xplr -m "[{CallLua: log_vroot}, {SetVroot: /arbitrary/path}]"
xplr -m "{{CallLua: log_vroot}, {SetVroot: /arbitrary/path}}"
# all various parsing errors
xplr -m "0: [CallLua: log_vroot, SetVroot: /arbitrary/path]"
# expected error on using incorrect formand a few other variations. It seems there is no reliable way to control input order of messages.
Metadata
Metadata
Assignees
Labels
No labels