pathr icon indicating copy to clipboard operation
pathr copied to clipboard

Revival

Open gaborcsardi opened this issue 9 years ago • 17 comments

I need some of these over and over again, so let's finish this package. Or least I'll add the things I need. FYI.

gaborcsardi avatar Apr 20 '16 08:04 gaborcsardi

OK, cool. Want me to add you as a collaborator and/or move somewhere author neutral such as ropenscilabs?

I also have periodic need for this so am open to spending a bit of time on it (but possibly not much spare bandwidth over the next 2-3 weeks).

richfitz avatar Apr 20 '16 08:04 richfitz

I don't mind, I am fine wil PRs as well for now. :)

gaborcsardi avatar Apr 20 '16 08:04 gaborcsardi

But then you need to review them. :)

gaborcsardi avatar Apr 20 '16 08:04 gaborcsardi

I'll review them quickly, don't worry.

richfitz avatar Apr 20 '16 09:04 richfitz

Quick q. I need some regular expression matching for path_isabs on windows. Do you mind if I depend on this: https://github.com/MangoTheCat/rematch ? It is small, R-only and has no dependencies.

EDIT: and I just submitted it to CRAN....

gaborcsardi avatar Apr 20 '16 18:04 gaborcsardi

Go for it! Looks like it might be useful in general though the package.

richfitz avatar Apr 20 '16 18:04 richfitz

I didn't even know I was watching this repo until the sudden re-awakening, but I am so glad to learn of rematch! I just wrote this and will gladly rip it back out again :).

jennybc avatar Apr 20 '16 19:04 jennybc

@jennybc Yeah, right? :) I wrote this about ~5 times at various places, and today I decided that it was enough. It is hard to get all the corner cases right, so it will be just perfect in its own package.

Btw. stringr::str_match is also pretty good, if you need sg comprehensive.

gaborcsardi avatar Apr 20 '16 19:04 gaborcsardi

Can you name a non-capturing group? Yes I googled it and ... answer not clear, so am lazy-githubbing with you.

jennybc avatar Apr 20 '16 20:04 jennybc

@jennybc I don't think you can in PCRE. It is not in the docs, and the obvious (?:<name>...) syntax does not work.

gaborcsardi avatar Apr 20 '16 21:04 gaborcsardi

@gaborcsardi That was my conclusion. It seems unfortunate. I don't see any reason these two things have to be incompatible. Yet I believe they are.

jennybc avatar Apr 21 '16 04:04 jennybc

I see I have high-jacked this issue before, but now I'm here to make an on-topic comment.

pathr would be really useful, so count me as another 👍!

I'm particularly interested in path_rel(). If user gives me "foo/bar/blah.R", I might have to normalize it into an absolute path and then form, say, a related path = a normalized version of "foo/bar/blah.md". But I'd like to message that in a way that matches the path style the user used, not the awful long normalized version. It feels like pathr would do the necessary file path arithmetic.

jennybc avatar Jan 06 '17 21:01 jennybc

@jennybc I might misunderstand sg, but path_rel() already does what you want, no?

gaborcsardi avatar Jan 06 '17 22:01 gaborcsardi

Yes! I just meant that path_rel() would be super useful and therefore nice to have on CRAN.

jennybc avatar Jan 06 '17 22:01 jennybc

update: this is my current train project (as I need something small and self contained to work on at the moment) and so will see a series of updates over the next few days/weeks

richfitz avatar Jan 18 '17 08:01 richfitz

\o/

gaborcsardi avatar Jan 18 '17 08:01 gaborcsardi

🚆🎉

jennybc avatar Jan 18 '17 14:01 jennybc