1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 20:04:11 +01:00

Serialize :hi -link.

This commit is contained in:
Kris Maglione
2011-10-19 22:38:35 -04:00
parent be3218dcfb
commit e43d81730e
2 changed files with 9 additions and 2 deletions

View File

@@ -836,8 +836,11 @@ var Commands = Module("commands", {
.toObject();
for (let [opt, val] in Iterator(args.options || {})) {
if (val === undefined)
continue;
if (val != null && defaults[opt] === val)
continue;
let chr = /^-.$/.test(opt) ? " " : "=";
if (isArray(val))
opt += chr + Option.stringify.stringlist(val);
@@ -845,6 +848,7 @@ var Commands = Module("commands", {
opt += chr + Commands.quote(val);
res.push(opt);
}
for (let [, arg] in Iterator(args.arguments || []))
res.push(Commands.quote(arg));