diff --git a/shell.js b/shell.js index a385506..56c44f1 100644 --- a/shell.js +++ b/shell.js @@ -178,7 +178,7 @@ function _cp(options, sources, dest) { if (arguments.length < 3) { error('missing and/or '); } else if (arguments.length > 3) { - sources = arguments.slice(1, arguments.length - 1); + sources = [].slice.call(arguments, 1, arguments.length - 2); dest = arguments[arguments.length - 1]; } @@ -1069,7 +1069,7 @@ function expand(list) { list.forEach(function(listEl) { // Wildcard present? if (listEl.search(/\*/) > -1) { - for (file in _ls(listEl)) + for (file in _ls('', listEl)) expanded.push(file); } else { expanded.push(listEl);