Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Add match for exact path ref #158 #237

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

eMerzh
Copy link

@eMerzh eMerzh commented Jul 13, 2016

Hi,

i'm really new in the atom dev / coffee and all,
but here is a small itch that i had using atom..
trying to past full path in the fuzzy finder and not having the ability to open the path directly...
might not be the place or the best way ....

The idea is that like :

  • i have a project in /user/project/ and a file /user/project/myfile.txt ... i've the project open in atom, and search for "/user/project/myfile.txt" and i can open the file (before i had to search for "myfile.txt" only)
  • i have a project in /user/project/ and a file /user/project/myfile.txt ... i've the project open in atom, and search for "/tmp/otherfile.txt" and i can open the file (before i had to open the open dialog to do it)

what do you think?

@winstliu
Copy link
Contributor

@eMerzh Can you please add some specs for this? Thanks.

@@ -585,6 +585,20 @@ describe 'FuzzyFinder', ->
expect(atom.workspace.panelForItem(projectView).isVisible()).toBe false
expect(inputView).toHaveFocus()

describe "when the filter text contains an absolute path", ->
it "it matches the given path", ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for a double it. it "matches the given path" is fine.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the review,
not sure about your comment, you suggest to replace

describe "when the filter text contains an absolute path", ->
   it "it matches the given path", ->

by

   it "it matches the given path", ->

?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

He's suggesting replace:

it "it matches the given path", ->

with

it "matches the given path", -"

You don't need to use the word it twice in the same line 😀

@winstliu
Copy link
Contributor

Let's say I input ~/.atom/config.cson as the filter query. Will that show up?

@eMerzh
Copy link
Author

eMerzh commented Jul 15, 2016

hum... nothing now...
but i think it might be a good addition ....
not sure how to do it though :/

EDIT: ok might have found :)

@eMerzh
Copy link
Author

eMerzh commented Jul 16, 2016

did i broke the tests? they all run ok on my machine

@winstliu
Copy link
Contributor

Don't worry about the tests.

@@ -585,6 +585,20 @@ describe 'FuzzyFinder', ->
expect(atom.workspace.panelForItem(projectView).isVisible()).toBe false
expect(inputView).toHaveFocus()

describe "when the filter text contains an absolute path", ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that relative paths are supported, can you also add a test for that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not really relative.... it's "normalized" , you can't do like ../current_file.html
although it could be interesting

but you cant do
~/.atom/config.cson or /home/me/../hello

@eMerzh
Copy link
Author

eMerzh commented Sep 22, 2016

is there something i can do to help this PR moving ?

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

Successfully merging this pull request may close these issues.

3 participants