diff options
author | Girish Ramakrishnan <girish@cloudron.io> | 2019-10-18 16:37:30 -0700 |
---|---|---|
committer | Girish Ramakrishnan <girish@cloudron.io> | 2019-10-18 17:38:42 -0700 |
commit | 511ce661de41d42ab427ab1e2f43cc9f2c84b6c7 (patch) | |
tree | 55452a79a2bd9740dc8e3190afd724f5850fe5f2 /cli/surfer.js | |
parent | 38932f15c25f28296b53ee2d7ce738a20c9f7b15 (diff) | |
download | Surfer-511ce661de41d42ab427ab1e2f43cc9f2c84b6c7.tar.gz Surfer-511ce661de41d42ab427ab1e2f43cc9f2c84b6c7.tar.zst Surfer-511ce661de41d42ab427ab1e2f43cc9f2c84b6c7.zip |
add surfer put examples and fix put
Diffstat (limited to 'cli/surfer.js')
-rwxr-xr-x | cli/surfer.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/cli/surfer.js b/cli/surfer.js index 33b4db6..bd574f5 100755 --- a/cli/surfer.js +++ b/cli/surfer.js | |||
@@ -21,10 +21,21 @@ program.command('logout') | |||
21 | .description('Logout from server') | 21 | .description('Logout from server') |
22 | .action(actions.logout); | 22 | .action(actions.logout); |
23 | 23 | ||
24 | program.command('put <file|dir> [files...]') | 24 | program.command('put <file|dir...>') |
25 | .option('-a --all', 'Also include hidden files and folders.', false) | 25 | .option('-a --all', 'Also include hidden files and folders.', false) |
26 | .description('Put a file, last argument is destination if provided') | 26 | .description('Puts a list of files or dirs to the destination. The last argument is destination dir') |
27 | .action(actions.put); | 27 | .action(actions.put) |
28 | .on('--help', function() { | ||
29 | console.log(); | ||
30 | console.log(' Examples:'); | ||
31 | console.log(); | ||
32 | console.log(' $ surfer put file.txt / # puts to /file.txt'); | ||
33 | console.log(' $ surfer put file.txt /data # puts to /data/file.txt'); | ||
34 | console.log(' $ surfer put dir /data # puts dir/* as /data/dir/*'); | ||
35 | console.log(' $ surfer put dir/. / # puts dir/* as /app/data/*'); | ||
36 | console.log(' $ surfer put dir1 dir2 file1 / # puts as /dir1/* /dir2/* and /file'); | ||
37 | console.log(); | ||
38 | }); | ||
28 | 39 | ||
29 | program.command('get [file|dir]') | 40 | program.command('get [file|dir]') |
30 | .description('Get a file or directory listing') | 41 | .description('Get a file or directory listing') |