From 24545229fc52aa6d948f9081472e65c7f17eaa14 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 1 Mar 2016 12:38:39 +0100 Subject: Require a file argument for delete --- cli/actions.js | 3 ++- cli/surfer.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'cli') diff --git a/cli/actions.js b/cli/actions.js index 7a361b7..59f0714 100644 --- a/cli/actions.js +++ b/cli/actions.js @@ -188,6 +188,7 @@ function del(filePath) { if (error && error.status === 401) return console.log('Login failed'); if (error && error.status === 404) return console.log('No such file or directory'); if (error) return console.log('Failed', result ? result.body : error); - console.log('Success', result.body); + + console.log('Success. Removed %s files.', result.body.entries.length); }); } diff --git a/cli/surfer.js b/cli/surfer.js index b311658..278724d 100755 --- a/cli/surfer.js +++ b/cli/surfer.js @@ -20,11 +20,11 @@ program.command('put [files...]') .action(actions.put); program.command('get [file]') - .description('Get a file or directory') + .description('Get a file or directory listing') .action(actions.get); -program.command('del') - .description('Delete a file') +program.command('del ') + .description('Delete a file or directory') .action(actions.del); program.parse(process.argv); -- cgit v1.2.3