mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 21:18:00 +01:00
Don't include the default -description value when serializing commands.
This commit is contained in:
@@ -1120,8 +1120,10 @@ function Commands() //{{{
|
|||||||
bang: true,
|
bang: true,
|
||||||
options: util.Array.toObject(
|
options: util.Array.toObject(
|
||||||
[[v, typeof cmd[k] == "boolean" ? null : cmd[k]]
|
[[v, typeof cmd[k] == "boolean" ? null : cmd[k]]
|
||||||
for ([k, v] in Iterator({ argCount: "-nargs", bang: "-bang", count: "-count" }))
|
// FIXME: this map is expressed multiple times
|
||||||
if (k in cmd && cmd[k] != "0")]),
|
for ([k, v] in Iterator({ argCount: "-nargs", bang: "-bang", count: "-count", description: "-description" }))
|
||||||
|
// FIXME: add support for default values to parseArgs
|
||||||
|
if (k in cmd && cmd[k] != "0" && cmd[k] != "User-defined command")]),
|
||||||
arguments: [cmd.name],
|
arguments: [cmd.name],
|
||||||
literalArg: cmd.replacementText
|
literalArg: cmd.replacementText
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user