diff --git a/common/content/commands.js b/common/content/commands.js index 0bd57a01..34726009 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -1291,9 +1291,14 @@ var Commands = Module("commands", { if (completer) { if (/^custom,/.test(completer)) { completer = completer.substr(7); + + let sourcing = update({}, io.sourcing || {}); completerFunc = function (context) { try { - var result = dactyl.userEval(completer); + var result = io.withSavedValues(["sourcing"], function () { + io.sourcing = sourcing; + return dactyl.userEval(completer); + }); } catch (e) { dactyl.echo(":" + this.name + " ...");