Closed vitiral closed 6 years ago
@killercup thoughts?
FYI https://twitter.com/killercup/status/957691964694188033
Am 29.01.2018 um 02:52 schrieb Garrett Berg notifications@github.com:
@killercup thoughts?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I can do that. You want to include ergo_fs into quicli?
On Jan 29, 2018 2:46 AM, "Pascal Hertleif" notifications@github.com wrote:
FYI https://twitter.com/killercup/status/957691964694188033
Am 29.01.2018 um 02:52 schrieb Garrett Berg notifications@github.com:
@killercup thoughts?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rust-crates/ergo_fs/issues/1#issuecomment-361191870, or mute the thread https://github.com/notifications/unsubscribe-auth/AFVCy6nDIDBHrAJMK2zpxM-QBQXyXKZlks5tPZN6gaJpZM4Rv90l .
@gilnaa is already working on it.
Not sure if I want to include (parts of) it in quicli or I use a subset of its re-exports and add documentation about where to find more.
So I'm thinking of doing PathType::glob, PathFile::glob, PathDir::glob
(and also the same for glob_with)
This will give the choice of what types they want. Thoughts?
Ok, I think that was the wrong approach.
Instead on my GlobPaths
object I'm going to have a files()
method that only returns files. I think that is the right approach.
This could honestly be added to the glob
crate as well. I think I'm going to add a PR.
Update: see issue https://github.com/rust-lang-nursery/glob/issues/65
done
@killercup I recommend not exporting ergo_fs
wholesale yet, as I think I'm going to remove the std_prelude
export and replace it with only Path
, PathBuf
, Read
and Write
.
Glob
Add functions
glob
andglob_with
which are identical to the ones in the glob crate except they return an iterator ofPathType
objects instead of simple paths.This should really have https://github.com/rust-lang-nursery/glob/issues/64 implemented so that
GlobError
is coercible intoio::Error
.GlobError
already provides excellent context.Shellexpand
This will mainly involve exporting the shellexpand module, but the trait mentioned in https://github.com/netvl/shellexpand/issues/2 would probably improve the ergonomics.
I have read through the shellexpand source code and I think it has ergonomic error messages.