Execute system commands via hotkeys or command palette in Obsidian (https://obsidian.md). Some automated events are also supported, and execution via URI links.
GNU General Public License v3.0
365
stars
12
forks
source link
Internal: Support multiple parameters for variables #43
parameter_name1, parameter_name2 and parameter_name3 are internal names for the parameters that are not exposed to users.
A user would write multiple arguments like this: {{variable:argument text:5:static}}, so : works as a separator between arguments. Note that argument text is a single argument, the space is just a normal character.
parameter_name3 is a parameter that can only take predefined values, so the value must be one of: static, value or options.
Support optional parameters
Parameters can be defined optional by setting required to false. Optional parameters can be located after or before mandatory parameters, maybe even in between (but this is untested!).
For some reason this issue was not added into a milestone even though the issue is done already. I added it to 0.6.0, which is a version where this was released in.
Current rules for {{variable}} parameters:
{{variable:parameter}}
) or no paramers ({{variable}}
).Terminology
An argument is a value that a user passes to a variable to control its behavior. A variable receives an argument as a parameter.
Support multiple parameters
Make a variable able to define parameters like this:
parameter_name1
,parameter_name2
andparameter_name3
are internal names for the parameters that are not exposed to users.A user would write multiple arguments like this:
is just a normal character.
{{variable:argument text:5:static}}
, so:
works as a separator between arguments. Note thatargument text
is a single argument, the spaceparameter_name3
is a parameter that can only take predefined values, so the value must be one of: static, value or options.Support optional parameters
Parameters can be defined optional by setting
required
tofalse
. Optional parameters can be located after or before mandatory parameters, maybe even in between (but this is untested!).