feature(columns) add name-size (#139)

This commit is contained in:
coderaiser 2018-03-14 11:50:44 +02:00
parent 22142e00ba
commit b232a936fb
8 changed files with 52 additions and 6 deletions

View file

@ -36,11 +36,17 @@ module.exports.packer = (name) => {
};
module.exports.columns = (type) => {
const addQuotes = (a) => `"${a}"`;
const all = Object
.keys(columns)
.concat('');
const names = all
.filter(Boolean)
.map(addQuotes)
.join(', ');
if (!~all.indexOf(type))
exit('cloudcmd --columns: could be "name-size-date" or "name-size-date-owner-mode"');
exit(`cloudcmd --columns: can be only one of: ${names}`);
};