mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(columns) add name-size (#139)
This commit is contained in:
parent
22142e00ba
commit
b232a936fb
8 changed files with 52 additions and 6 deletions
|
|
@ -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}`);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue