1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 09:17:59 +01:00

add 'exrc'

This commit is contained in:
Doug Kearns
2008-10-21 15:45:57 +00:00
parent b58c04200f
commit 2141d475f8
6 changed files with 27 additions and 4 deletions

View File

@@ -63,6 +63,10 @@ const liberator = (function () //{{{
"Ring the bell when an error message is displayed",
"boolean", false);
options.add(["exrc", "ex"],
"Allow reading of an RC file in the current directory",
"boolean", false);
const tabopts = [
["n", "Tab number", null, ".hl-TabNumber"],
["N", "Tab number over icon", null, ".hl-TabIconNumber"],
@@ -1168,13 +1172,20 @@ const liberator = (function () //{{{
// make sourcing asynchronous, otherwise commands that open new tabs won't work
setTimeout(function () {
var rcFile = io.getRCFile();
let rcFile = io.getRCFile("~");
if (rcFile)
io.source(rcFile.path, true);
else
liberator.log("No user RC file found", 3);
if (options["exrc"])
{
let localRcFile = io.getRCFile(io.getCurrentDirectory());
if (localRcFile)
io.source(localRcFile.path, true);
}
if (options["loadplugins"])
liberator.loadPlugins();