mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 08:38:00 +01:00
add new 'urlseparator' option
This commit is contained in:
2
NEWS
2
NEWS
@@ -8,6 +8,8 @@
|
||||
generous donation which made this behavior possible)
|
||||
* IMPORTANT: ctrl-x/a never take possible negative URLs into account, it was just
|
||||
too unpredictable
|
||||
* new 'urlseparator' option for specifying the regexp used to split the arg to
|
||||
:open, :tabopen and :winopen
|
||||
* :set editor now accepts quoting/escaping to use an editor with spaces in the path
|
||||
* support for :%foo as a count for commands (not yet widely used)
|
||||
* show informative message when a background tab was loaded, especially useful
|
||||
|
||||
@@ -278,7 +278,7 @@ liberator.util = { //{{{
|
||||
// and returns an array ['www.google.com/search?q=bla', 'www.osnews.com']
|
||||
stringToURLArray: function (str)
|
||||
{
|
||||
var urls = str.split(/\s*\,\s+/);
|
||||
var urls = str.split(new RegExp("\s*" + liberator.options["urlseparator"] + "\s*"));
|
||||
|
||||
begin: for (var url = 0; url < urls.length; url++)
|
||||
{
|
||||
|
||||
@@ -375,6 +375,10 @@ liberator.config = { //{{{
|
||||
getService(Components.interfaces.nsIIOService2).offline;
|
||||
}
|
||||
});
|
||||
|
||||
liberator.options.add(["urlseparator"],
|
||||
"Set the separator regexp used to split URL args",
|
||||
"string", ",\\s");
|
||||
}
|
||||
//}}}
|
||||
}; //}}}
|
||||
|
||||
@@ -35,8 +35,8 @@ section:Opening{nbsp}web{nbsp}pages[opening]
|
||||
||o||
|
||||
________________________________________________________________________________
|
||||
Open one or more URLs in the current tab.
|
||||
Multiple URLs can be separated with ", ".
|
||||
Note that the space after the comma is required.
|
||||
Multiple URLs can be separated with 'urlseparator' (default: ", " Note that the
|
||||
space after the comma is required.")
|
||||
Each token is analyzed and in this order:
|
||||
|
||||
1. Opened as a local file if it is an existing relative or absolute filename.
|
||||
|
||||
@@ -565,6 +565,17 @@ Note that this is a local option for now, later it may be split into a global an
|
||||
____
|
||||
|
||||
|
||||
|\'urlseparator'|
|
||||
||'urlseparator'|| string (default: ",\s")
|
||||
____
|
||||
Set the separator regexp used to separate multiple URL args. Multiple
|
||||
arguments can be specified for :open, and similar commands, using this regexp
|
||||
as the separator. Using whitespace alone is not generally useful since it is
|
||||
often contained in a single argument. E.g. [c]:open linus torvalds[c] should
|
||||
perform a single search for the key words "linus" and "torvalds"
|
||||
____
|
||||
|
||||
|
||||
|\'verbose', \'vbs'|
|
||||
||'verbose' 'vbs'|| number (default: 0)
|
||||
____
|
||||
|
||||
Reference in New Issue
Block a user