nikivi Posted October 16, 2016 Share Posted October 16, 2016 I made a simple file filter : Which is scoped to my home folder like so : 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
deanishe Posted October 16, 2016 Share Posted October 16, 2016 Post the thing that's broken, not pictures of it. Link to comment
nikivi Posted October 16, 2016 Author Share Posted October 16, 2016 (edited) 6 minutes ago, deanishe said: Post the thing that's broken, not pictures of it. Yeah, sorry. Here is the workflow itself. (https://infinit.io/_/32uyJAz) (not sure what is the best way to share these things) Edited October 16, 2016 by nikivi Link to comment
nikivi Posted October 16, 2016 Author Share Posted October 16, 2016 (edited) Never mind. Dragging things from a similar workflow worked : https://infinit.io/_/wH3S6TL Just need to figure out how to run 'nvim' command on the files searched and it should be great. Edited October 16, 2016 by nikivi Link to comment
nikivi Posted October 16, 2016 Author Share Posted October 16, 2016 (edited) I found this online : http://thepugautomatic.com/2015/02/open-in-iterm-vim-from-finder/ This doesn't seem to work though, maybe it is my own bad implementation : Here is the full workflow : https://infinit.io/_/38Ves4n Edited October 16, 2016 by nikivi Link to comment
nikivi Posted October 16, 2016 Author Share Posted October 16, 2016 Also it doesn't find some files once again. For example I have some files without any extensions like these : I drag them to my file filter and get this : And yet these files are not found : Link to comment
deanishe Posted October 16, 2016 Share Posted October 16, 2016 (edited) 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 October 16, 2016 by deanishe Link to comment
nikivi Posted October 16, 2016 Author Share Posted October 16, 2016 Well it is the same workflow that I posted a minute earlier, so I didn't want to post the same thing again. Link to comment
deanishe Posted October 16, 2016 Share Posted October 16, 2016 Then there's no need to post screenshots of it, too. Did you figure out why your AppleScript is broken? Link to comment
nikivi Posted October 16, 2016 Author Share Posted October 16, 2016 (edited) 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 October 16, 2016 by nikivi Link to comment
deanishe Posted October 16, 2016 Share Posted October 16, 2016 Like I said, I honestly can't be bothered any more, niki. You just don't appear to think before posting (or after). I mean, in what way is a screenshot of an empty list of results at all meaningful? (That's a rhetorical question. Don't answer.) Link to comment
nikivi Posted October 17, 2016 Author Share Posted October 17, 2016 (edited) 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 : 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 October 17, 2016 by nikivi Link to comment
nikivi Posted October 19, 2016 Author Share Posted October 19, 2016 (edited) Yay. It works 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 October 20, 2016 by deanishe Convert Markdown link to BB code Link to comment
Vero Posted October 20, 2016 Share Posted October 20, 2016 @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. Link to comment
nikivi Posted October 20, 2016 Author Share Posted October 20, 2016 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
Andrew Posted October 28, 2016 Share Posted October 28, 2016 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now