mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 09:48:00 +01:00
Fix n_~. Closes issue #68.
This commit is contained in:
@@ -94,7 +94,7 @@ const Browser = Module("browser", {
|
|||||||
|
|
||||||
mappings.add([modes.NORMAL], ["~"],
|
mappings.add([modes.NORMAL], ["~"],
|
||||||
"Open home directory",
|
"Open home directory",
|
||||||
function () { dactyl.open("~"); });
|
function () { dactyl.open("~/"); });
|
||||||
|
|
||||||
mappings.add([modes.NORMAL], ["gh"],
|
mappings.add([modes.NORMAL], ["gh"],
|
||||||
"Open homepage",
|
"Open homepage",
|
||||||
|
|||||||
@@ -965,7 +965,7 @@ const Commands = Module("commands", {
|
|||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
// returns [count, parsed_argument]
|
// returns [count, parsed_argument]
|
||||||
parseArg: function (str, sep, keepQuotes) {
|
parseArg: function parseArg(str, sep, keepQuotes) {
|
||||||
let arg = "";
|
let arg = "";
|
||||||
let quote = null;
|
let quote = null;
|
||||||
let len = str.length;
|
let len = str.length;
|
||||||
|
|||||||
@@ -893,7 +893,7 @@ const Dactyl = Module("dactyl", {
|
|||||||
urls = [str];
|
urls = [str];
|
||||||
|
|
||||||
return urls.map(function (url) {
|
return urls.map(function (url) {
|
||||||
if (/^(\.{0,2}|~)\//.test(url)) {
|
if (/^(\.{0,2}|~)(\/|$)/.test(url)) {
|
||||||
try {
|
try {
|
||||||
// Try to find a matching file.
|
// Try to find a matching file.
|
||||||
let file = io.File(url);
|
let file = io.File(url);
|
||||||
|
|||||||
Reference in New Issue
Block a user