mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 15:57:58 +01:00
Fix some :cd problems. Remove special treatement of ,, in 'cdpath'.
This commit is contained in:
@@ -46,27 +46,6 @@ function redirect(to, orig, time) {
|
|||||||
return makeChannel(dataURL('text/html', html), ioService.newURI(to, null, null));
|
return makeChannel(dataURL('text/html', html), ioService.newURI(to, null, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
function AboutHandler() {}
|
|
||||||
AboutHandler.prototype = {
|
|
||||||
|
|
||||||
classDescription: "About " + Dactyl.prototype.name + " Page",
|
|
||||||
|
|
||||||
classID: Components.ID("81495d80-89ee-4c36-a88d-ea7c4e5ac63f"),
|
|
||||||
|
|
||||||
contractID: "@mozilla.org/network/protocol/about;1?what=" + Dactyl.prototype.appname,
|
|
||||||
|
|
||||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
|
|
||||||
|
|
||||||
newChannel: function (uri) {
|
|
||||||
let channel = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService)
|
|
||||||
.newChannel("chrome://dactyl/content/about.xul", null, null);
|
|
||||||
channel.originalURI = uri;
|
|
||||||
return channel;
|
|
||||||
},
|
|
||||||
|
|
||||||
getURIFlags: function (uri) Ci.nsIAboutModule.ALLOW_SCRIPT,
|
|
||||||
};
|
|
||||||
|
|
||||||
function ChromeData() {}
|
function ChromeData() {}
|
||||||
ChromeData.prototype = {
|
ChromeData.prototype = {
|
||||||
contractID: "@mozilla.org/network/protocol;1?name=chrome-data",
|
contractID: "@mozilla.org/network/protocol;1?name=chrome-data",
|
||||||
@@ -178,6 +157,27 @@ Dactyl.prototype = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function AboutHandler() {}
|
||||||
|
AboutHandler.prototype = {
|
||||||
|
|
||||||
|
classDescription: "About " + Dactyl.prototype.name + " Page",
|
||||||
|
|
||||||
|
classID: Components.ID("81495d80-89ee-4c36-a88d-ea7c4e5ac63f"),
|
||||||
|
|
||||||
|
contractID: "@mozilla.org/network/protocol/about;1?what=" + Dactyl.prototype.appname,
|
||||||
|
|
||||||
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
|
||||||
|
|
||||||
|
newChannel: function (uri) {
|
||||||
|
let channel = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService)
|
||||||
|
.newChannel("chrome://dactyl/content/about.xul", null, null);
|
||||||
|
channel.originalURI = uri;
|
||||||
|
return channel;
|
||||||
|
},
|
||||||
|
|
||||||
|
getURIFlags: function (uri) Ci.nsIAboutModule.ALLOW_SCRIPT,
|
||||||
|
};
|
||||||
|
|
||||||
// A hack to get infermation about interfaces.
|
// A hack to get infermation about interfaces.
|
||||||
// Doesn't belong here.
|
// Doesn't belong here.
|
||||||
function Shim() {}
|
function Shim() {}
|
||||||
|
|||||||
@@ -670,7 +670,7 @@ const Buffer = Module("buffer", {
|
|||||||
try {
|
try {
|
||||||
window.urlSecurityCheck(url, doc.nodePrincipal);
|
window.urlSecurityCheck(url, doc.nodePrincipal);
|
||||||
// we always want to save that link relative to the current working directory
|
// we always want to save that link relative to the current working directory
|
||||||
options.setPref("browser.download.lastDir", io.getCurrentDirectory().path);
|
options.setPref("browser.download.lastDir", io.cwd);
|
||||||
window.saveURL(url, text, null, true, skipPrompt, makeURI(url, doc.characterSet));
|
window.saveURL(url, text, null, true, skipPrompt, makeURI(url, doc.characterSet));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
@@ -1232,7 +1232,7 @@ const Buffer = Module("buffer", {
|
|||||||
// if browser.download.useDownloadDir = false then the "Save As"
|
// if browser.download.useDownloadDir = false then the "Save As"
|
||||||
// dialog is used with this as the default directory
|
// dialog is used with this as the default directory
|
||||||
// TODO: if we're going to do this shouldn't it be done in setCWD or the value restored?
|
// TODO: if we're going to do this shouldn't it be done in setCWD or the value restored?
|
||||||
options.setPref("browser.download.lastDir", io.getCurrentDirectory().path);
|
options.setPref("browser.download.lastDir", io.cwd);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var contentDisposition = window.content
|
var contentDisposition = window.content
|
||||||
|
|||||||
@@ -2046,7 +2046,7 @@ const Dactyl = Module("dactyl", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options["exrc"] && !dactyl.commandLineOptions.rcFile) {
|
if (options["exrc"] && !dactyl.commandLineOptions.rcFile) {
|
||||||
let localRCFile = io.getRCFile(io.getCurrentDirectory().path);
|
let localRCFile = io.getRCFile(io.cwd);
|
||||||
if (localRCFile && !localRCFile.equals(rcFile))
|
if (localRCFile && !localRCFile.equals(rcFile))
|
||||||
io.source(localRCFile.path, true);
|
io.source(localRCFile.path, true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ function Script(file) {
|
|||||||
const IO = Module("io", {
|
const IO = Module("io", {
|
||||||
init: function () {
|
init: function () {
|
||||||
this._processDir = services.get("directory").get("CurWorkD", Ci.nsIFile);
|
this._processDir = services.get("directory").get("CurWorkD", Ci.nsIFile);
|
||||||
this._cwd = this._processDir;
|
this._cwd = this._processDir.path;
|
||||||
this._oldcwd = null;
|
this._oldcwd = null;
|
||||||
|
|
||||||
this._lastRunCommand = ""; // updated whenever the users runs a command with :!
|
this._lastRunCommand = ""; // updated whenever the users runs a command with :!
|
||||||
@@ -66,6 +66,50 @@ const IO = Module("io", {
|
|||||||
services.get("downloadManager").addListener(this.downloadListener);
|
services.get("downloadManager").addListener(this.downloadListener);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: there seems to be no way, short of a new component, to change
|
||||||
|
// the process's CWD - see https://bugzilla.mozilla.org/show_bug.cgi?id=280953
|
||||||
|
/**
|
||||||
|
* Returns the current working directory.
|
||||||
|
*
|
||||||
|
* It's not possible to change the real CWD of the process so this
|
||||||
|
* state is maintained internally. External commands run via
|
||||||
|
* {@link #system} are executed in this directory.
|
||||||
|
*
|
||||||
|
* @returns {nsIFile}
|
||||||
|
*/
|
||||||
|
get cwd() {
|
||||||
|
let dir = File(this._cwd);
|
||||||
|
|
||||||
|
// NOTE: the directory could have been deleted underneath us so
|
||||||
|
// fallback to the process's CWD
|
||||||
|
if (dir.exists() && dir.isDirectory())
|
||||||
|
return dir.path;
|
||||||
|
else
|
||||||
|
return this._processDir.path;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the current working directory.
|
||||||
|
*
|
||||||
|
* @param {string} newDir The new CWD. This may be a relative or
|
||||||
|
* absolute path and is expanded by {@link #expandPath}.
|
||||||
|
*/
|
||||||
|
set cwd(newDir) {
|
||||||
|
newDir = newDir || "~";
|
||||||
|
|
||||||
|
if (newDir == "-") {
|
||||||
|
dactyl.assert(this._oldcwd != null, "E186: No previous directory");
|
||||||
|
[this._cwd, this._oldcwd] = [this._oldcwd, this.cwd];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
let dir = io.File(newDir);
|
||||||
|
dactyl.assert(dir.exists() && dir.isDirectory(), "E344: Can't find directory " + dir.path.quote());
|
||||||
|
[this._cwd, this._oldcwd] = [dir.path, this.cwd];
|
||||||
|
}
|
||||||
|
return this.cwd;
|
||||||
|
},
|
||||||
|
|
||||||
destroy: function () {
|
destroy: function () {
|
||||||
services.get("downloadManager").removeListener(this.downloadListener);
|
services.get("downloadManager").removeListener(this.downloadListener);
|
||||||
for (let [, plugin] in Iterator(plugins.contexts))
|
for (let [, plugin] in Iterator(plugins.contexts))
|
||||||
@@ -79,7 +123,7 @@ const IO = Module("io", {
|
|||||||
*/
|
*/
|
||||||
File: Class("File", File, {
|
File: Class("File", File, {
|
||||||
init: function init(path, checkCWD)
|
init: function init(path, checkCWD)
|
||||||
init.supercall(this, path, (arguments.length < 2 || checkCWD) && io.getCurrentDirectory())
|
init.supercall(this, path, (arguments.length < 2 || checkCWD) && io.cwd)
|
||||||
}),
|
}),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -106,53 +150,6 @@ const IO = Module("io", {
|
|||||||
*/
|
*/
|
||||||
expandPath: File.expandPath,
|
expandPath: File.expandPath,
|
||||||
|
|
||||||
// TODO: there seems to be no way, short of a new component, to change
|
|
||||||
// the process's CWD - see https://bugzilla.mozilla.org/show_bug.cgi?id=280953
|
|
||||||
/**
|
|
||||||
* Returns the current working directory.
|
|
||||||
*
|
|
||||||
* It's not possible to change the real CWD of the process so this
|
|
||||||
* state is maintained internally. External commands run via
|
|
||||||
* {@link #system} are executed in this directory.
|
|
||||||
*
|
|
||||||
* @returns {nsIFile}
|
|
||||||
*/
|
|
||||||
getCurrentDirectory: function () {
|
|
||||||
let dir = File(this._cwd.path);
|
|
||||||
|
|
||||||
// NOTE: the directory could have been deleted underneath us so
|
|
||||||
// fallback to the process's CWD
|
|
||||||
if (dir.exists() && dir.isDirectory())
|
|
||||||
return dir;
|
|
||||||
else
|
|
||||||
return this._processDir;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the current working directory.
|
|
||||||
*
|
|
||||||
* @param {string} newDir The new CWD. This may be a relative or
|
|
||||||
* absolute path and is expanded by {@link #expandPath}.
|
|
||||||
*/
|
|
||||||
setCurrentDirectory: function (newDir) {
|
|
||||||
newDir = newDir || "~";
|
|
||||||
|
|
||||||
if (newDir == "-")
|
|
||||||
[this._cwd, this._oldcwd] = [this._oldcwd, this.getCurrentDirectory()];
|
|
||||||
else {
|
|
||||||
let dir = io.File(newDir);
|
|
||||||
|
|
||||||
if (!dir.exists() || !dir.isDirectory()) {
|
|
||||||
dactyl.echoerr("E344: Can't find directory " + dir.path.quote());
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
[this._cwd, this._oldcwd] = [dir, this.getCurrentDirectory()];
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.getCurrentDirectory(); // XXX
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all directories named <b>name<b/> in 'runtimepath'.
|
* Returns all directories named <b>name<b/> in 'runtimepath'.
|
||||||
*
|
*
|
||||||
@@ -160,9 +157,9 @@ const IO = Module("io", {
|
|||||||
* @returns {nsIFile[])
|
* @returns {nsIFile[])
|
||||||
*/
|
*/
|
||||||
getRuntimeDirectories: function (name) {
|
getRuntimeDirectories: function (name) {
|
||||||
let dirs = File.getPathsFromPathList(options["runtimepath"]);
|
let dirs = options.get("runtimepath").values;
|
||||||
|
|
||||||
dirs = dirs.map(function (dir) File.joinPaths(dir, name))
|
dirs = dirs.map(function (dir) File.joinPaths(dir, name, this.cwd))
|
||||||
.filter(function (dir) dir.exists() && dir.isDirectory() && dir.isReadable());
|
.filter(function (dir) dir.exists() && dir.isDirectory() && dir.isReadable());
|
||||||
return dirs;
|
return dirs;
|
||||||
},
|
},
|
||||||
@@ -179,8 +176,8 @@ const IO = Module("io", {
|
|||||||
getRCFile: function (dir, always) {
|
getRCFile: function (dir, always) {
|
||||||
dir = dir || "~";
|
dir = dir || "~";
|
||||||
|
|
||||||
let rcFile1 = File.joinPaths(dir, "." + config.name + "rc");
|
let rcFile1 = File.joinPaths(dir, "." + config.name + "rc", this.cwd);
|
||||||
let rcFile2 = File.joinPaths(dir, "_" + config.name + "rc");
|
let rcFile2 = File.joinPaths(dir, "_" + config.name + "rc", this.cwd);
|
||||||
|
|
||||||
if (dactyl.has("WINNT"))
|
if (dactyl.has("WINNT"))
|
||||||
[rcFile1, rcFile2] = [rcFile2, rcFile1];
|
[rcFile1, rcFile2] = [rcFile2, rcFile1];
|
||||||
@@ -229,11 +226,11 @@ const IO = Module("io", {
|
|||||||
let dirs = services.get("environment").get("PATH").split(dactyl.has("WINNT") ? ";" : ":");
|
let dirs = services.get("environment").get("PATH").split(dactyl.has("WINNT") ? ";" : ":");
|
||||||
// Windows tries the CWD first TODO: desirable?
|
// Windows tries the CWD first TODO: desirable?
|
||||||
if (dactyl.has("WINNT"))
|
if (dactyl.has("WINNT"))
|
||||||
dirs = [io.getCurrentDirectory().path].concat(dirs);
|
dirs = [io.cwd].concat(dirs);
|
||||||
|
|
||||||
lookup:
|
lookup:
|
||||||
for (let [, dir] in Iterator(dirs)) {
|
for (let [, dir] in Iterator(dirs)) {
|
||||||
file = File.joinPaths(dir, program);
|
file = File.joinPaths(dir, program, io.cwd);
|
||||||
try {
|
try {
|
||||||
if (file.exists())
|
if (file.exists())
|
||||||
break;
|
break;
|
||||||
@@ -243,7 +240,7 @@ lookup:
|
|||||||
if (dactyl.has("WINNT")) {
|
if (dactyl.has("WINNT")) {
|
||||||
let extensions = services.get("environment").get("PATHEXT").split(";");
|
let extensions = services.get("environment").get("PATHEXT").split(";");
|
||||||
for (let [, extension] in Iterator(extensions)) {
|
for (let [, extension] in Iterator(extensions)) {
|
||||||
file = File.joinPaths(dir, program + extension);
|
file = File.joinPaths(dir, program + extension, io.cwd);
|
||||||
if (file.exists())
|
if (file.exists())
|
||||||
break lookup;
|
break lookup;
|
||||||
}
|
}
|
||||||
@@ -278,7 +275,7 @@ lookup:
|
|||||||
* @param {boolean} all Whether all found files should be sourced.
|
* @param {boolean} all Whether all found files should be sourced.
|
||||||
*/
|
*/
|
||||||
sourceFromRuntimePath: function (paths, all) {
|
sourceFromRuntimePath: function (paths, all) {
|
||||||
let dirs = File.getPathsFromPathList(options["runtimepath"]);
|
let dirs = options.get("runtimepath").values;
|
||||||
let found = false;
|
let found = false;
|
||||||
|
|
||||||
dactyl.echomsg("Searching for " + paths.join(" ").quote() + " in " + options["runtimepath"].quote(), 2);
|
dactyl.echomsg("Searching for " + paths.join(" ").quote() + " in " + options["runtimepath"].quote(), 2);
|
||||||
@@ -286,7 +283,7 @@ lookup:
|
|||||||
outer:
|
outer:
|
||||||
for (let [, dir] in Iterator(dirs)) {
|
for (let [, dir] in Iterator(dirs)) {
|
||||||
for (let [, path] in Iterator(paths)) {
|
for (let [, path] in Iterator(paths)) {
|
||||||
let file = File.joinPaths(dir, path);
|
let file = File.joinPaths(dir, path, this.cwd);
|
||||||
|
|
||||||
dactyl.echomsg("Searching for " + file.path.quote(), 3);
|
dactyl.echomsg("Searching for " + file.path.quote(), 3);
|
||||||
|
|
||||||
@@ -460,11 +457,11 @@ lookup:
|
|||||||
|
|
||||||
// TODO: implement 'shellredir'
|
// TODO: implement 'shellredir'
|
||||||
if (dactyl.has("WINNT")) {
|
if (dactyl.has("WINNT")) {
|
||||||
command = "cd /D " + this._cwd.path + " && " + command + " > " + stdout.path + " 2>&1" + " < " + stdin.path;
|
command = "cd /D " + this.cwd + " && " + command + " > " + stdout.path + " 2>&1" + " < " + stdin.path;
|
||||||
var res = this.run(options["shell"], options["shellcmdflag"].split(/\s+/).concat(command), true);
|
var res = this.run(options["shell"], options["shellcmdflag"].split(/\s+/).concat(command), true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cmd.write("cd " + escape(this._cwd.path) + "\n" +
|
cmd.write("cd " + escape(this.cwd) + "\n" +
|
||||||
["exec", ">" + escape(stdout.path), "2>&1", "<" + escape(stdin.path),
|
["exec", ">" + escape(stdout.path), "2>&1", "<" + escape(stdin.path),
|
||||||
escape(options["shell"]), options["shellcmdflag"], escape(command)].join(" "));
|
escape(options["shell"]), options["shellcmdflag"], escape(command)].join(" "));
|
||||||
res = this.run("/bin/sh", ["-e", cmd.path], true);
|
res = this.run("/bin/sh", ["-e", cmd.path], true);
|
||||||
@@ -532,10 +529,6 @@ lookup:
|
|||||||
|
|
||||||
if (!arg)
|
if (!arg)
|
||||||
arg = "~";
|
arg = "~";
|
||||||
else if (arg == "-") {
|
|
||||||
dactyl.assert(io._oldcwd, "E186: No previous directory");
|
|
||||||
arg = io._oldcwd.path;
|
|
||||||
}
|
|
||||||
|
|
||||||
arg = File.expandPath(arg);
|
arg = File.expandPath(arg);
|
||||||
|
|
||||||
@@ -543,28 +536,23 @@ lookup:
|
|||||||
// match in 'cdpath'
|
// match in 'cdpath'
|
||||||
// TODO: handle ../ and ./ paths
|
// TODO: handle ../ and ./ paths
|
||||||
if (File.isAbsolutePath(arg)) {
|
if (File.isAbsolutePath(arg)) {
|
||||||
if (io.setCurrentDirectory(arg))
|
io.cwd = arg;
|
||||||
dactyl.echomsg(io.getCurrentDirectory().path);
|
dactyl.echomsg(io.cwd);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let dirs = File.getPathsFromPathList(options["cdpath"]);
|
let dirs = options.get("cdpath").values;
|
||||||
let found = false;
|
|
||||||
|
|
||||||
for (let [, dir] in Iterator(dirs)) {
|
for (let [, dir] in Iterator(dirs)) {
|
||||||
dir = File.joinPaths(dir, arg);
|
dir = File.joinPaths(dir, arg, io.cwd);
|
||||||
|
|
||||||
if (dir.exists() && dir.isDirectory() && dir.isReadable()) {
|
if (dir.exists() && dir.isDirectory() && dir.isReadable()) {
|
||||||
io.setCurrentDirectory(dir.path);
|
io.cwd = dir.path;
|
||||||
dactyl.echomsg(io.getCurrentDirectory().path);
|
dactyl.echomsg(io.cwd);
|
||||||
found = true;
|
return;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found) {
|
dactyl.echoerr("E344: Can't find directory " + arg.quote() + " in cdpath");
|
||||||
dactyl.echoerr("E344: Can't find directory " + arg.quote() + " in cdpath\n"
|
dactyl.echoerr("E472: Command failed");
|
||||||
+ "E472: Command failed");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
argCount: "?",
|
argCount: "?",
|
||||||
@@ -580,7 +568,7 @@ lookup:
|
|||||||
|
|
||||||
commands.add(["pw[d]"],
|
commands.add(["pw[d]"],
|
||||||
"Print the current directory name",
|
"Print the current directory name",
|
||||||
function () { dactyl.echomsg(io.getCurrentDirectory().path); },
|
function () { dactyl.echomsg(io.cwd); },
|
||||||
{ argCount: "0" });
|
{ argCount: "0" });
|
||||||
|
|
||||||
commands.add([config.name.replace(/(.)(.*)/, "mk$1[$2rc]")],
|
commands.add([config.name.replace(/(.)(.*)/, "mk$1[$2rc]")],
|
||||||
@@ -804,7 +792,7 @@ lookup:
|
|||||||
});
|
});
|
||||||
options.add(["cdpath", "cd"],
|
options.add(["cdpath", "cd"],
|
||||||
"List of directories searched when executing :cd",
|
"List of directories searched when executing :cd",
|
||||||
"stringlist", "," + (services.get("environment").get("CDPATH").replace(/[:;]/g, ",") || ","),
|
"stringlist", ["."].concat(services.get("environment").get("CDPATH").split(/[:;]/).filter(util.identity)).join(","),
|
||||||
{ setter: function (value) File.expandPathList(value) });
|
{ setter: function (value) File.expandPathList(value) });
|
||||||
|
|
||||||
options.add(["runtimepath", "rtp"],
|
options.add(["runtimepath", "rtp"],
|
||||||
|
|||||||
@@ -388,7 +388,7 @@
|
|||||||
<tags>'cd' 'cdpath'</tags>
|
<tags>'cd' 'cdpath'</tags>
|
||||||
<spec>'cdpath' 'cd'</spec>
|
<spec>'cdpath' 'cd'</spec>
|
||||||
<type>string</type>
|
<type>string</type>
|
||||||
<default type="plain">equivalent to <em>$CDPATH</em> or <str>,,</str></default>
|
<default type="plain">equivalent to <em>$CDPATH</em> or <str>.</str></default>
|
||||||
<description>
|
<description>
|
||||||
<p>
|
<p>
|
||||||
List of directories searched when executing the <ex>:cd</ex>
|
List of directories searched when executing the <ex>:cd</ex>
|
||||||
|
|||||||
@@ -532,14 +532,6 @@ const File = Class("File", {
|
|||||||
|
|
||||||
expandPathList: function (list) list.map(this.expandPath),
|
expandPathList: function (list) list.map(this.expandPath),
|
||||||
|
|
||||||
getPathsFromPathList: function (list) {
|
|
||||||
if (!list)
|
|
||||||
return [];
|
|
||||||
// empty list item means the current directory
|
|
||||||
return list.replace(/,$/, "").split(",")
|
|
||||||
.map(function (dir) dir == "" ? io.getCurrentDirectory().path : dir);
|
|
||||||
},
|
|
||||||
|
|
||||||
isAbsolutePath: function (path) {
|
isAbsolutePath: function (path) {
|
||||||
try {
|
try {
|
||||||
services.create("file").initWithPath(path);
|
services.create("file").initWithPath(path);
|
||||||
@@ -550,11 +542,12 @@ const File = Class("File", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
joinPaths: function (head, tail) {
|
joinPaths: function (head, tail, cwd) {
|
||||||
let path = this(head);
|
let path = this(head, cwd);
|
||||||
try {
|
try {
|
||||||
// FIXME: should only expand env vars and normalise path separators
|
// FIXME: should only expand env vars and normalise path separators
|
||||||
path.appendRelativePath(this.expandPath(tail, true));
|
path.appendRelativePath(this.expandPath(tail, true));
|
||||||
|
path.normalize();
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
return { exists: function () false, __noSuchMethod__: function () { throw e; } };
|
return { exists: function () false, __noSuchMethod__: function () { throw e; } };
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
1.0b1:
|
1.0b1:
|
||||||
* Extensive Firefox 4 support, including:
|
* Extensive Firefox 4 support, including:
|
||||||
- Tabs in :buffer completions and listings are grouped
|
- Tabs in :buffer completions and listings are grouped
|
||||||
by panorama groups
|
by panorama groups.
|
||||||
- Only visible tabs are considered in tab numbering,
|
- Only visible tabs are considered in tab numbering,
|
||||||
gt/gn/gN, etc.
|
gt/gn/gN, etc.
|
||||||
* Improved startup time by a factor of 7.
|
* Improved startup time by a factor of 7.
|
||||||
@@ -19,16 +19,18 @@
|
|||||||
backspace.
|
backspace.
|
||||||
- Supports reverse incremental search.
|
- Supports reverse incremental search.
|
||||||
* IMPORTANT: Plugins are now loaded from the 'plugins/'
|
* IMPORTANT: Plugins are now loaded from the 'plugins/'
|
||||||
directory in 'runtimepath' rather than 'plugin/'
|
directory in 'runtimepath' rather than 'plugin/'.
|
||||||
* IMPORTANT: Single quotes no longer treat \s specially
|
* IMPORTANT: Single quotes no longer treat \s specially.
|
||||||
I.e., 'fo\o''bar' ≡ fo\o'bar
|
I.e., 'fo\o''bar' ≡ fo\o'bar
|
||||||
|
* IMPORTANT: 'cdpath' no longer treats ‘,,’ specially. Use ‘.’
|
||||||
|
instead.
|
||||||
* Replaced 'focuscontent' with 'strictfocus'
|
* Replaced 'focuscontent' with 'strictfocus'
|
||||||
* Added 'hintkeys' option
|
* Added 'hintkeys' option.
|
||||||
* Added 'altwildmode' and <A-Tab> commandline key binding
|
* Added 'altwildmode' and <A-Tab> commandline key binding.
|
||||||
* Added 'banghist' option
|
* Added 'banghist' option.
|
||||||
* Added ‘transliterated’ option to 'hintmatching'
|
* Added ‘transliterated’ option to 'hintmatching'
|
||||||
* Added 'autocomplete' option for specifying which completion
|
* Added 'autocomplete' option for specifying which completion
|
||||||
contexts should be autocompleted
|
groups should be auto-completed.
|
||||||
* Added -javascript option to :abbrev and :map
|
* Added -javascript option to :abbrev and :map
|
||||||
* Added several new options to :map
|
* Added several new options to :map
|
||||||
* Removed the :source line at the end of files generated by
|
* Removed the :source line at the end of files generated by
|
||||||
@@ -42,15 +44,15 @@
|
|||||||
triggers when the URL begins as above.
|
triggers when the URL begins as above.
|
||||||
* Page zoom information is now shown in the status bar, and
|
* Page zoom information is now shown in the status bar, and
|
||||||
change in zoom status no longer appears in :messages.
|
change in zoom status no longer appears in :messages.
|
||||||
* Added ZO, ZI, ZM, and ZR as aliases for zO, zI, zM, and zR
|
* Added ZO, ZI, ZM, and ZR as aliases for zO, zI, zM, and zR.
|
||||||
* Completion list now behaves better when the multi-line output
|
* Completion list now behaves better when the multi-line output
|
||||||
window is displayed
|
window is displayed.
|
||||||
* Major help system improvements:
|
* Major help system improvements:
|
||||||
- Plugins may now provide full-fledged ':help' documentation
|
- Plugins may now provide full-fledged ':help' documentation.
|
||||||
- Add basic plugin authorship documentation
|
- Add basic plugin authorship documentation.
|
||||||
- The help system is newly modularized and features significant
|
- The help system is newly modularized and features significant
|
||||||
updates, rewrites, and formatting improvements.
|
updates, rewrites, and formatting improvements.
|
||||||
* Remove :edit, :tabedit, and :winedit aliases.
|
* Remove :edit, :tabedit, and :winedit aliases.
|
||||||
* Add 'jsdebugger' option - switch on/off javascript debugger service
|
* Add 'jsdebugger' option - switch on/off javascript debugger service.
|
||||||
* Add "addons", "downloads", "extoptions" and "help" to the 'activate' option.
|
* Add "addons", "downloads", "extoptions" and "help" to the 'activate' option.
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ BUGS:
|
|||||||
(recent Mercurial regressions):
|
(recent Mercurial regressions):
|
||||||
9 One of the recent completion fixes seems to have broken the caret
|
9 One of the recent completion fixes seems to have broken the caret
|
||||||
position update. BLOCKER.
|
position update. BLOCKER.
|
||||||
|
9 about:pentadactyl is currently about:undefined
|
||||||
|
|
||||||
- visual caret mode is broken, requires a manual page focus first anyway or
|
- visual caret mode is broken, requires a manual page focus first anyway or
|
||||||
else it chucks, I haven't investigated --djk
|
else it chucks, I haven't investigated --djk
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ component {8e4a8e2f-95a0-4d8f-90ac-fc9d7d8f5468} components/dactyl.js
|
|||||||
contract @dactyl.googlecode.com/base/dactyl {8e4a8e2f-95a0-4d8f-90ac-fc9d7d8f5468}
|
contract @dactyl.googlecode.com/base/dactyl {8e4a8e2f-95a0-4d8f-90ac-fc9d7d8f5468}
|
||||||
|
|
||||||
component {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69} components/commandline-handler.js
|
component {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69} components/commandline-handler.js
|
||||||
contract @mozilla.org/commandlinehandler/general-startup;1?type=pentadactyl {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69}
|
contract @mozilla.org/commandlinehandler/general-startup;1?type=dactyl {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69}
|
||||||
category command-line-handler m-pentadactyl @mozilla.org/commandlinehandler/general-startup;1?type=pentadactyl
|
category command-line-handler m-dactyl @mozilla.org/commandlinehandler/general-startup;1?type=dactyl
|
||||||
|
|
||||||
component {c1b67a07-18f7-4e13-b361-2edcc35a5a0d} components/protocols.js
|
component {c1b67a07-18f7-4e13-b361-2edcc35a5a0d} components/protocols.js
|
||||||
contract @mozilla.org/network/protocol;1?name=chrome-data {c1b67a07-18f7-4e13-b361-2edcc35a5a0d}
|
contract @mozilla.org/network/protocol;1?name=chrome-data {c1b67a07-18f7-4e13-b361-2edcc35a5a0d}
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ component {8e4a8e2f-95a0-4d8f-90ac-fc9d7d8f5468} components/dactyl.js
|
|||||||
contract @dactyl.googlecode.com/base/dactyl {8e4a8e2f-95a0-4d8f-90ac-fc9d7d8f5468}
|
contract @dactyl.googlecode.com/base/dactyl {8e4a8e2f-95a0-4d8f-90ac-fc9d7d8f5468}
|
||||||
|
|
||||||
component {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69} components/commandline-handler.js
|
component {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69} components/commandline-handler.js
|
||||||
contract @mozilla.org/commandlinehandler/general-startup;1?type=teledactyl {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69}
|
contract @mozilla.org/commandlinehandler/general-startup;1?type=dactyl {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69}
|
||||||
category command-line-handler m-teledactyl @mozilla.org/commandlinehandler/general-startup;1?type=pentadactyl
|
category command-line-handler m-dactyl @mozilla.org/commandlinehandler/general-startup;1?type=dactyl
|
||||||
|
|
||||||
component {c1b67a07-18f7-4e13-b361-2edcc35a5a0d} components/protocols.js
|
component {c1b67a07-18f7-4e13-b361-2edcc35a5a0d} components/protocols.js
|
||||||
contract @mozilla.org/network/protocol;1?name=chrome-data {c1b67a07-18f7-4e13-b361-2edcc35a5a0d}
|
contract @mozilla.org/network/protocol;1?name=chrome-data {c1b67a07-18f7-4e13-b361-2edcc35a5a0d}
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ component {8e4a8e2f-95a0-4d8f-90ac-fc9d7d8f5468} components/dactyl.js
|
|||||||
contract @dactyl.googlecode.com/base/dactyl {8e4a8e2f-95a0-4d8f-90ac-fc9d7d8f5468}
|
contract @dactyl.googlecode.com/base/dactyl {8e4a8e2f-95a0-4d8f-90ac-fc9d7d8f5468}
|
||||||
|
|
||||||
component {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69} components/commandline-handler.js
|
component {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69} components/commandline-handler.js
|
||||||
contract @mozilla.org/commandlinehandler/general-startup;1?type=xulmus {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69}
|
contract @mozilla.org/commandlinehandler/general-startup;1?type=mus {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69}
|
||||||
category command-line-handler m-xulmus @mozilla.org/commandlinehandler/general-startup;1?type=pentadactyl
|
category command-line-handler m-dactyl @mozilla.org/commandlinehandler/general-startup;1?type=dactyl
|
||||||
|
|
||||||
component {c1b67a07-18f7-4e13-b361-2edcc35a5a0d} components/protocols.js
|
component {c1b67a07-18f7-4e13-b361-2edcc35a5a0d} components/protocols.js
|
||||||
contract @mozilla.org/network/protocol;1?name=chrome-data {c1b67a07-18f7-4e13-b361-2edcc35a5a0d}
|
contract @mozilla.org/network/protocol;1?name=chrome-data {c1b67a07-18f7-4e13-b361-2edcc35a5a0d}
|
||||||
|
|||||||
Reference in New Issue
Block a user