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

Fix issue 15 better #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix issue 15 better #65

wants to merge 1 commit into from

Conversation

alphapapa
Copy link

[Note: This pull request got lost, so I rebased it and am resubmitting it.]

I think this fixes Issue 15 better than the issue-15 branch, because that branch seems to cause the previous mode to fail (i.e. if the query is the last element of the path, it returns no results). With this patch, the following works:

$ cd ~/.mozilla/firefox/foo.bar
$ cd

$ fasd -d foo
1 ~/.mozilla/firefox/foo.bar

$ fasd -d bar
1 ~/.mozilla/firefox/foo.bar

$ fasd -d firefox
1 ~/.mozilla/firefox/foo.bar

$ fasd -d f f b
1 ~/.mozilla/firefox/foo.bar

I think this fixes Issue 15 better than the issue-15 branch, because that branch seems to cause the previous mode to fail (i.e. if the query is the last element of the path, it returns no results).  With this patch, the following works:

$ cd ~/.mozilla/firefox/foo.bar
$ cd
$ fasd -d foo
1 ~/.mozilla/firefox/foo.bar
$ fasd -d bar
1 ~/.mozilla/firefox/foo.bar
$ fasd -d firefox
1 ~/.mozilla/firefox/foo.bar
$ fasd -d f f b
1 ~/.mozilla/firefox/foo.bar
@clvv
Copy link
Owner

clvv commented Sep 29, 2015

Sorry for leaving the last PR unresolved. It is still more intuitive to me that the query should match the last segment of the path. You can always just use part of the file name as query, and you should. However, I do agree in the fall-back fuzzy mode this should be turned on.

@alphapapa
Copy link
Author

No prob, I've been happily using fasd this whole time. :)

But I'm not sure I've kept up with developments since then. So I'm not sure what you mean about the fall-back fuzzy mode.

So...where do I go from here? Should I just keep using my little fork, or...? :)

@clvv
Copy link
Owner

clvv commented Sep 29, 2015

By the fuzzy mode I meant the second line you changed. If your fork is working fine there's no need to switch. There hasn't been much change in the last couple of years.

@alphapapa
Copy link
Author

Ok, thanks. I confess that I don't really grok the fasd code, I just know it works great, and I was able to figure out how to make this little change to make it work better for me. :)

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

Successfully merging this pull request may close these issues.

2 participants