diff --git a/common/content/browser.js b/common/content/browser.js index cd5f6a72..f854bcaa 100644 --- a/common/content/browser.js +++ b/common/content/browser.js @@ -94,7 +94,7 @@ const Browser = Module("browser", { mappings.add([modes.NORMAL], ["~"], "Open home directory", - function () { dactyl.open("~"); }); + function () { dactyl.open("~/"); }); mappings.add([modes.NORMAL], ["gh"], "Open homepage", diff --git a/common/content/commands.js b/common/content/commands.js index 9e5f60fc..7c29932d 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -965,7 +965,7 @@ const Commands = Module("commands", { } }, { // returns [count, parsed_argument] - parseArg: function (str, sep, keepQuotes) { + parseArg: function parseArg(str, sep, keepQuotes) { let arg = ""; let quote = null; let len = str.length; diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 115739b2..75d532e8 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -893,7 +893,7 @@ const Dactyl = Module("dactyl", { urls = [str]; return urls.map(function (url) { - if (/^(\.{0,2}|~)\//.test(url)) { + if (/^(\.{0,2}|~)(\/|$)/.test(url)) { try { // Try to find a matching file. let file = io.File(url);