I have a hidden file (.htaccess). When I double click it I would like it to open with a certain app (Sublime Text for this particular file type). In order to set the default app I have to open the "Get Info" window for that file (Cmd+I).
However, that file is hidden. So I can't right button click (two-finger tap) it to select the "Get Info" option from the context dropdown menu.
So the question is how do I open the "Get Info" window for a hidden file? The goal is to be able to change the default app for that file type.
p.s. I do not want to make my hidden files visible. Even temporarily.
Best Answer
You can use the following shell function. This uses
open information window
which is much better than GUI scripting or keyboard shortcut scripting which relies on the file shown in Finder.Source: https://superuser.com/a/509080/
Run with