Skip to content

Commit

Permalink
commands: Give a brief mnemonic of variable name annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuav committed Jun 23, 2023
1 parent 39ed9b4 commit 894ee3d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions httpstatic/command_gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,23 +375,27 @@ const types = {
color: "#dd7777", label: el => `Add ${el.message} to $${el.target}$`,
params: [{attr: "dest", values: "/set"}, {attr: "destcfg", values: "add"},
{attr: "target", label: "Variable name"}, {attr: "message", label: "Increment by"}],
typedesc: "Update a variable. Can be accessed as $varname$ in this or any other command.",
typedesc: ["Update a variable. Can be accessed as $varname$ in this or any other command.", BR(),
"Use ", CODE("*varname"), " for a per-user variable, and/or ", CODE("varname?"), " for ephemeral."],
},
incr_variable_complex: {
color: "#dd7777", children: ["message"], label: el => `Add onto $${el.target}$`,
params: [{attr: "dest", values: "/set"}, {attr: "destcfg", values: "add"},
{attr: "target", label: "Variable name"},],
typedesc: "Capture message as a variable update. Can be accessed as $varname$ in this or any other command.",
typedesc: ["Capture message as a variable update. Can be accessed as $varname$ in this or any other command.", BR(),
"Use ", CODE("*varname"), " for a per-user variable, and/or ", CODE("varname?"), " for ephemeral."],
},
set_variable: {
color: "#dd7777", label: el => el.message ? `Set $${el.target}$ to ${el.message}` : `Empty out $${el.target}$`,
params: [{attr: "dest", values: "/set"}, {attr: "target", label: "Variable name"}, {attr: "message", label: "New value"}],
typedesc: "Change a variable. Can be accessed as $varname$ in this or any other command.",
typedesc: ["Change a variable. Can be accessed as $varname$ in this or any other command.", BR(),
"Use ", CODE("*varname"), " for a per-user variable, and/or ", CODE("varname?"), " for ephemeral."],
},
set_variable_complex: {
color: "#dd7777", children: ["message"], label: el => `Change variable $${el.target}$`,
params: [{attr: "dest", values: "/set"}, {attr: "target", label: "Variable name"},],
typedesc: "Capture message into a variable. Can be accessed as $varname$ in this or any other command.",
typedesc: ["Capture message into a variable. Can be accessed as $varname$ in this or any other command.", BR(),
"Use ", CODE("*varname"), " for a per-user variable, and/or ", CODE("varname?"), " for ephemeral."],
},
...builtin_types(),
handle_errors: {
Expand Down

0 comments on commit 894ee3d

Please sign in to comment.