Jump to content

Alfred doesn't find files when it should


Recommended Posts

I made a simple file filter : 

 

bysasEj.png

 

Which is scoped to my home folder like so : 

 

TpDZx8Z.png

 

 

This however shows me no results when I search. :( 

 

Even though there are many files of this type in my home directory. What am I doing wrong?

 

Thank you for any help.

Link to comment

From Alfred's default template for AppleScript:

set theQuery to "{query}"

So yeah, it's your own bad implementation.

 

And you just don't learn.

 

It's literally one hour since I reminded you to post the thing that's broken, not pictures of it, and you're already back to posting screenshots.

 

Perhaps someone else will help you, but I'm done, tbh.

Edited by deanishe
Link to comment

No, I think the tell application part of the applescript code doesn't seem to work as I think it should : 

 

set theQuery to "{query}"
set cmd to "nvim " & quote & theQuery & quote

tell application "iTerm"
   activate
   set myTerm to (make new terminal)
   tell myTerm
      set mySession to (make new session at the end of sessions)
      tell mySession to exec command cmd
	end tell
end tell

Trying it out in Script editor to see if it runs there, I get strange errors like 'Error on line 1: SyntaxError: Unexpected identifier 'theQuery''. 

 

Also, Dean, aren't screenshots the best way to help visualise what it is you are trying to solve? What is wrong with them? I guess I can tell everything in words but I still think images tell that story a lot better than just a bunch of words. 

Edited by nikivi
Link to comment

I understand. I will try to figure out how to make the applescript work, I think it shouldn't be that hard with some experimenting in script editor and internet.

 

I still can't really explain why the file filter doesn't catch everything and show me all of the files in all of folders that should be in my home directory.

 

One of the folders that is in my ~/ home folder is alfred with alfred preferences in it where alfred keeps its workflows in all these big folders : 

 

P2m1ws8.png 

 

Well, shouldn't alfred pick these files in these folders too? For example I have a file filter for .go files and searching for read.go gives me no results, but it should. :( 

 

Same for that case with zvim above. It seems that Alfred completely ignores these folders. I even explicitly added these folders to the search even though they should be falling under my ~/ home folder and yet I still get no results. Perhaps I am missing something or it is some kind of bug.

 

Thank you a lot for any help on this. I really wish I can get it to work well as it would be quite a useful workflow for me and I hope some other person who too uses vim as their editor.

 

Edited by nikivi
Link to comment

Yay. It works :D

 

Here is the final workflow.

 

I still have no idea why the file filter doesn't show everything though so it is indeed not complete. Can someone help me understand why that is? Will be really thankful for any help.

Edited by deanishe
Convert Markdown link to BB code
Link to comment
35 minutes ago, Vero said:

@nikivi The contents of packages (such as Alfred's preferences file and much of the contents of ~/Library/) aren't usually indexed by OS X, so won't be provided to Alfred to include into results. 

But I also have .dotfiles folder in home directory that is not in ~/Library/ and it too seems to be not indexed. Is that intended?

Link to comment
  • 2 weeks later...

Dot files aren't indexed by OS X, but you can see (and filter) these in Alfred.

 

For example, to see dot files in your home folder, open Alfred and type ~ which will take you to your home folder in the navigation mode, then type .

 

From this, you can further filter within this specific folder by starting to type the name of the dot file you want to see.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...