1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-15 08:53:32 +01:00

Default arguments ftw.

This commit is contained in:
Kris Maglione
2013-09-21 16:57:09 -07:00
parent 25aae2cc99
commit 35784406a0
8 changed files with 14 additions and 30 deletions

View File

@@ -971,10 +971,7 @@ var Commands = Module("commands", {
parseArgs: function parseArgs(str, params) {
const self = this;
function getNextArg(str, _keepQuotes) {
if (arguments.length < 2)
_keepQuotes = keepQuotes;
function getNextArg(str, _keepQuotes=keepQuotes) {
if (str.substr(0, 2) === "<<" && hereDoc) {
let arg = /^<<(\S*)/.exec(str)[1];
let count = arg.length + 2;