filer icon indicating copy to clipboard operation
filer copied to clipboard

Support glob patterns in shell commands

Open humphd opened this issue 6 years ago • 0 comments

We only support glob patterns in sh.find(). Let's add them to some other shell commands:

sh.ls(dir, [options], callback)
sh.cat(files, callback)
sh.rm(path, [options], callback)

These should support being passed a glob pattern, for example:

// List all .js files in src
sh.ls('/src/*.js', callback);

// Concatenate all .txt files in docs
sh.cat('/docs/*.txt', callback);

// Delete all .tmp files
sh.rm('/*.tmp', callback);

NOTE: might be good to do https://github.com/filerjs/filer/issues/598 first, but it's not critical.

humphd avatar Dec 02 '18 15:12 humphd