Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails when relative path is not prepended with "./" #63

Closed
mkell85 opened this issue May 8, 2015 · 7 comments
Closed

Fails when relative path is not prepended with "./" #63

mkell85 opened this issue May 8, 2015 · 7 comments

Comments

@mkell85
Copy link

mkell85 commented May 8, 2015

Doesn't play well with ack (or any other tool with similar output) because ack does not prepend a "./" to the file list returned from . E.g.

ack -l 'foo'
junk/foo/bar.txt

ack -l 'foo' | fpp <------- Does not work needs ./junk/foo/bar.txt instead.

@pedropedruzzi
Copy link
Contributor

Describe what do not work.

@gsheld
Copy link
Contributor

gsheld commented May 10, 2015

+ 1

@brentvatne
Copy link

Same problem here, on a React Native project I ran:

ag RCTNavItem node_modules | fpp

I then scrolled down to node_modules/react-native/React/Views/RCTNavItem.h:12:@interface RCTNavItem : UIView and pressed enter

It opened:
~/www/node_modules/react-native/React/Views/RCTNavItem.h

I wanted it to open the relative path:
./node_modules/react-native/React/Views/RCTNavItem.h

@dutzi
Copy link

dutzi commented May 11, 2015

+1 for command line svn

@brentvatne
Copy link

To anyone else having the issue I mentioned above with ag, for now it works fine to do ag searchterm path --ackmate | fpp

@pcottle
Copy link
Contributor

pcottle commented May 11, 2015

Sorry for the ~/www fallback, that is vestigial and only relevant for facebook dev environments.

we only do a hail-mary fallback punt if you are working outside of a git or mercurial repo, since we parse the top-level path here:
https://github.com/facebook/PathPicker/blob/master/src/parse.py#L38-L69

so this shouldn't be superrrrr common, but i guess it's clearly happening.

Anyways this is resolved by e302f16, update your version manually or wait for the next release to fix this! thanks all for the report

@pcottle pcottle closed this as completed May 11, 2015
@brentvatne
Copy link

great, thanks @pcottle! this was actually happening from within a git repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants